Skip to content

Make email optional for GitHub OAuth login#356

Open
mathieudutour wants to merge 4 commits intoavitorio:canaryfrom
mathieudutour:fix/missing-email-oauth-error
Open

Make email optional for GitHub OAuth login#356
mathieudutour wants to merge 4 commits intoavitorio:canaryfrom
mathieudutour:fix/missing-email-oauth-error

Conversation

@mathieudutour
Copy link
Copy Markdown
Contributor

  • 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 entirely with a raw JSON error.
  • Make email optional in LoginSession type and session validation
  • Remove email requirement from the OAuth callback guard
  • Fall back to login name in the header when email is absent
  • Also fix the old missing_user_data JSON error to redirect to the login page with a friendly message (covers the case where the GitHub /user API itself fails)

claude added 3 commits March 24, 2026 19:30
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
@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Mar 24, 2026

@claude is attempting to deploy a commit to the andre Team on Vercel.

A member of the Team first needs to authorize it.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 24, 2026

🦋 Changeset detected

Latest commit: 5ca03f0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
outstatic Patch

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants