Issue with use OAuth with react blog - using NextJs ts
-
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
-
@rationem You could look at my backend app in this monorepo: https://github.com/kasir-barati/you-say
There I've implemented a NestJS custom backend app. BTW I have a question for you, right now my NextJS frontend build is broken and I do not know why, I mean I kinda know that it is because I am using
@fusionauth/react-sdk
and it needs to have access todocument
object but since during build it does not have that my build is defective. Any suggestion?I also read this doc but it was not what I wanted since it was communicating directly with FusionAuth and in my case I do not want that .