Navigation

    FusionAuth
    • Login
    • Search
    • Home
    • Categories
    • Recent
    • Popular
    • Pricing
    • Contact us
    • Docs

    UNSOLVED Issue with use OAuth with react blog - using NextJs ts

    Q&A
    1
    1
    151
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      rationem last edited by

      Hi,
      I am attempting to follow the OAuth with react blog
      My stack uses NextJs and NestJs (built on express).
      In the server login route, I am getting a typescript error.
      The code with the error is:

      @Get('/login')
        public async login(@Req()request: Request, @Res() response: Response){
          const state = crypto.randomBytes(64)
          request.session.oauthState = state;
        }
      

      The typescript error is

      Property 'oauthState' does not exist on type 'Session & Partial<SessionData>'.ts(2339)
      

      I have the latest types definition file
      @types/express-session": "^1.17.5",

      Could you assist?

      Many thanks

      1 Reply Last reply Reply Quote 0
      • First post
        Last post