Replies: 1 comment 4 replies
-
Hi there, you could check out the jwt and session callbacks to save your received jwt token https://next-auth.js.org/configuration/callbacks When you receive your token on signin, you can also utilize the signIn callback to validate it, and if you deem it invalid, just return false in the signIn callback. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I am trying to use NextAuth as auth provider for my project. I have a requirement where I have Credential based login/password. In this case when I login I have to pass the username/password to the custom API (for ex.: abc.com/auth/login). This API as success will return me a JWT for future communication to access their resources.
What I understood from NextAuth that it maintain its own session and JWT(if DB not provided). This feature works in my case but I have to maintain the JWT which the API has returned me(mentioned above). So now there are two JWT one which I received from API and the one which NextAuth has created.
My question:
Please suggest.
Beta Was this translation helpful? Give feedback.
All reactions