Google oauth2 get access token #3282
-
Hi ! I want to get the google access token cause I need to send it to my API for authentification. But I don't manage to get it. How can I do ? is it possible to get directly the access token instead of the authorization code ? I've tried to exchange the autorization code for an acces token with google oauth API but I got an error :
Any help is welcome, thanks ! 🙏 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
could you share what you are trying to achieve? after logging in, your access token is available on the https://next-auth.js.org/configuration/callbacks#jwt-callback |
Beta Was this translation helpful? Give feedback.
-
[next-auth][error][OAUTH_CALLBACK_ERROR] could you please help me with this not able to resolve it |
Beta Was this translation helpful? Give feedback.
could you share what you are trying to achieve? after logging in, your access token is available on the
account
object in the jwt callback. None of the above is necessary.https://next-auth.js.org/configuration/callbacks#jwt-callback