Skip to content

fix(auth): request user:email scope for GitHub OAuth sign-in - #461

Open
davidselo wants to merge 1 commit into
theam:mainfrom
davidselo:fix/oauth-email-scope
Open

davidselo wants to merge 1 commit into
theam:mainfrom
davidselo:fix/oauth-email-scope

Conversation

@davidselo

Copy link
Copy Markdown

Summary

  • The GitHub OAuth authorize URL never set a scope parameter, so the
    issued token had no access to /user/emails.
  • This made sign-in fail with "GitHub identity or installation access
    could not be verified" even with correctly configured app credentials,
    since ExternalIdentityProvider.exchangeGithub requires that call to
    succeed.
  • Adds scope: "user:email" to the authorize request, matching how the
    OIDC branch already sets its own scope.

Test plan

  • Added an assertion in identity-provider.test.ts confirming the
    authorize URL includes scope=user:email
  • npx vitest run test/identity-provider.test.ts — 8/8 passing

🤖 Generated with Claude Code

The authorize URL never set a scope, so the OAuth token GitHub issued
had no access to /user/emails, making the identity exchange fail with
"GitHub identity or installation access could not be verified" even
for a correctly configured app and valid credentials.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

1 participant