-
Hello, We are using Nextauth with Prisma and things are running smoothly when use email to login. When we use Github oAuth, email is not returned if the users doesn't have the email shown publicly. Our application needs the email. I tried to use a custom Provider to see if we can get the email somehow:
I can fetch https://api.github.com/user/emails under the profile function use use that to get the email. But how can I access the accessToken in that function? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Found the answer. We can add a signin callback:
We could add this to the documentation under the Github provider since many users do need the user email. |
Beta Was this translation helpful? Give feedback.
-
Any idea how to get login of the user and return it to the user object? |
Beta Was this translation helpful? Give feedback.
Found the answer. We can add a signin callback:
We could add this to the documentation under the Github provider since many users do need the user email.