Implementing Google Auth without NextAuth while utilizing Backend API to get user information using Google API #12101
Unanswered
Incredible311
asked this question in
Help
Replies: 1 comment
-
Since you are not using next-auth at all, we cannot update the next-auth session. |
Beta Was this translation helpful? Give feedback.
0 replies
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.
-
For now, I customized handler for clicking the button for "Google Sign In" like below.
In 'api/oauth/google/route.ts', I defined GET API endpoint to work as redirect_uri for Google Sign In. In this function, I'm calling the backend API endpoint which will get user information using Google API with code from redirect_uri.
I can get accessToken and user information successfully, but have some troubles to update the NextAuth Session so that those information can be used like a normal session in NextAuth.
Please let me know if there is any unclear parts or if you have any concerns.
Looking forward to hearing from you soon.
Best,
Beta Was this translation helpful? Give feedback.
All reactions