When using a next-auth Provider (Google), How do I use a token generated from my backend API? #4019
Unanswered
longfellowone
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I found this online (link below). I am trying to insert my own JWT from a custom backend, into the next-auth session. What the example below is showing, is to modify the { user } object in signIn(). This does not work as user is not returned... What is the correct way to accomplish this?
I thought maybe you could do
getTokenFromYourAPIServer('github', githubUser)
inside the jwt() function. But then how would I reject a user if they were not allowed to sign in?https://arunoda.me/blog/add-auth-support-to-a-next-js-app-with-a-custom-backend
Beta Was this translation helpful? Give feedback.
All reactions