You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Per the GitHub provider documentation, where the tip at the bottom of the page states:
Email address is always returned, even if the user doesn't have a public email address on their profile.
I would have expected the user object GitHub returns to have the email. However, GitHub is passing me back a user object only with a valid name and image, but an undefined email value and a null emailVerified value.
Provider type
GitHub
Environment
System:
OS: macOS 12.6
CPU: (8) arm64 Apple M1
Memory: 1.01 GB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.17.1 - /usr/local/bin/node
npm: 8.15.0 - /usr/local/bin/npm
Browsers:
Chrome: 106.0.5249.119
Safari: 15.6.1
npmPackages:
next: latest => 12.3.1
next-auth: ^4.14.0 => 4.14.0
react: 18.1.0 => 18.1.0
Reproduction URL
https://next-auth.js.org/tutorials/creating-a-database-adapter
Describe the issue
Per the GitHub provider documentation, where the tip at the bottom of the page states:
I would have expected the user object GitHub returns to have the email. However, GitHub is passing me back a user object only with a valid name and image, but an undefined email value and a null emailVerified value.
`{
name: 'John Doe',
email: undefined,
image: 'https://avatars.githubusercontent.com/u/______',
emailVerified: null
}
How to reproduce
[...nextauth].js file where GitHub provider is added:
Custom adapter createUser() function:
Object returned from GitHub in the createUser() function:
Expected behavior
User object returned by github containing an email as stated in the documentation.
The text was updated successfully, but these errors were encountered: