Make email optional for GitHub OAuth login#356
Open
mathieudutour wants to merge 4 commits intoavitorio:canaryfrom
Open
Make email optional for GitHub OAuth login#356mathieudutour wants to merge 4 commits intoavitorio:canaryfrom
mathieudutour wants to merge 4 commits intoavitorio:canaryfrom
Conversation
Previously, when a GitHub user had no email on their account, the OAuth
callback returned raw JSON ({ error: 'missing_user_data' }) with a 403
status. Now it redirects to the login page with a clear error message
directing the user to add an email in their GitHub settings.
https://claude.ai/code/session_01CafFocscuvqnKpnqJsFRjS
Email was required for login but never used for anything functional — only displayed in the header dropdown. Users with no email on their GitHub account were blocked from logging in entirely. - Make email optional in LoginSession type and session validation - Remove email requirement from OAuth callback guard - Fall back to login name in the header when email is absent - Redirect to login page with a friendly error if userData fetch fails https://claude.ai/code/session_01CafFocscuvqnKpnqJsFRjS
Replace the three remaining NextResponse.json error responses in the callback handler with redirects to the login page, so users always see a friendly error message instead of raw JSON. https://claude.ai/code/session_01CafFocscuvqnKpnqJsFRjS
Contributor
|
@claude is attempting to deploy a commit to the andre Team on Vercel. A member of the Team first needs to authorize it. |
🦋 Changeset detectedLatest commit: 5ca03f0 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
emailoptional inLoginSessiontype and session validationmissing_user_dataJSON error to redirect to the login page with a friendly message (covers the case where the GitHub/userAPI itself fails)