Skip to content

docs: document how to get the user email from Google - #323

Merged
umputun merged 2 commits into
masterfrom
readme-google-email
Nov 1, 2026
Merged

umputun merged 2 commits into
masterfrom
readme-google-email

Conversation

@umputun

@umputun umputun commented Nov 1, 2026

Copy link
Copy Markdown
Member

the built-in Google provider requests only the userinfo.profile scope, so Google never returns the user's email and an email mapping via AddProviderWithUserAttributes stays empty. The minimal scope is deliberate (#37), so this documents the way around it instead of changing the scope.

  • new "Google user email" section in README with an AddCustomProvider example registered as google in place of AddProvider("google", ...). It keeps the /auth/google/callback URI and the built-in user id, requests the email scope, and sets Email only when Google reports it as verified
  • the Custom oauth2 Name bullet now allows a built-in name when the custom provider is registered in its place
  • drops the backlog item this implements, adds one for the undocumented AddProviderWithUserAttributes

Related to #249

the built-in Google provider requests only the userinfo.profile scope, so
Google never returns the email and an email attribute mapping stays empty.
The new README section shows AddCustomProvider registered as "google" with
the email scope, keeping the built-in callback URI and user ids, and sets
Email only for a verified address. Drops the backlog item it implements.

Related to #249
Copilot AI balanced review requested due to automatic review settings November 1, 2026 17:24

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are blocking approval of the documentation changes.

No open issues 🎉

What changed in this PR

Documents how to retrieve a verified Google email address without changing the built-in provider’s deliberately minimal scope.

Changes:

  • Adds a custom Google provider example that requests email access while preserving existing user IDs and the callback URI.
  • Clarifies when a custom provider can use a built-in provider name.
  • Replaces the completed Google-email backlog item with a follow-up to document AddProviderWithUserAttributes.
File Description
README.md Adds Google email guidance and clarifies custom provider naming.
docs/​backlog/​readme-user-attributes-undocumented.md Tracks missing documentation for user-attribute mapping.
docs/​backlog/​readme-google-email-scope-undocumented.md Removes the completed Google email documentation task.

Review effort: Balanced

@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 41331320703

Coverage remained the same at 86.88%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 3849
Covered Lines: 3344
Line Coverage: 86.88%
Coverage Strength: 9.95 hits per line

💛 - Coveralls

@umputun
umputun merged commit 576d2f6 into master Nov 1, 2026
8 checks passed
@umputun
umputun deleted the readme-google-email branch November 1, 2026 17:27
@paskal paskal mentioned this pull request Nov 8, 2026
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.

3 participants