Next.js Discord

Discord Forum

Next Auth Token Session Structure

Unanswered
Saltwater Crocodile posted this in #help-forum
Open in Discord
Saltwater CrocodileOP
Hi Everyon i am currently building a NextJS Nest JS Application and i have a question. When signing in the nestjs application returns a object of the user and backendTokens with a acccessToken and refreshToken inside.

In the next-auth.d.ts i set the structure of the JWT and Session. Now when signing in with credentials and i console.log the session i get all of the infos correct. But how do i implement that with my google Provider signin. I tried doing that with profile but it didn't work so far.

Thank you for your help

7 Replies

Saltwater CrocodileOP
Let me know if you need any more infos.
Please @ me on response
Saltwater CrocodileOP
When console logging the token in the jwt callback the module i declared above doesnt apply
And both session and user is undefined
But with credentials everything works