Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: check if emails exist in userInfo callback of GitHub provider #12667

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nikita-lepikhin
Copy link

This PR adds a JS check for whether the request to GitHub's /public_emails actually returns any public emails. Before the change, the code would fail if GitHub API did not return any public emails. Any error thrown in the userInfo callback would abort the OAuth login flow.

The user does not have to have a public email set. All registered emails could be hidden in Settings -> Emails -> Keep my email addresses private.

Copy link

vercel bot commented Feb 18, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
auth-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 18, 2025 6:53pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
next-auth-docs ⬜️ Ignored (Inspect) Visit Preview Feb 18, 2025 6:53pm

Copy link

vercel bot commented Feb 18, 2025

@nikita-lepikhin is attempting to deploy a commit to the authjs Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Refers to `@auth/core` providers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant