Skip to content

docs(authentication): clarify OAuth authStrategies security - #3698

Merged
marshallswain merged 1 commit into
dovefrom
docs/oauth-authstrategies-security
Aug 11, 2026
Merged

docs(authentication): clarify OAuth authStrategies security#3698
marshallswain merged 1 commit into
dovefrom
docs/oauth-authstrategies-security

Conversation

@marshallswain

Copy link
Copy Markdown
Member

Summary

Documents a common OAuth misconfiguration: listing provider names (google, microsoft, etc.) in public authentication.authStrategies when only the browser redirect flow is needed.

  • Safe default: register the strategy + configure authentication.oauth; omit providers from authStrategies (matches the generator).
  • Why it matters: authStrategies allows strategies on external POST /authentication. Default getProfile returns data.profile and does not verify a provider token, so a client-supplied profile/sub must never be treated as identity.
  • Flow Added a couple examples. Started to add a mongo adapter. #2: still documented for mobile / existing provider tokens, but only with both allowlisting and a verifying getProfile (Facebook Graph / Firebase verifyIdToken patterns).

Changes

File Update
docs/api/authentication/oauth.md New “Configuration and security” section; rewritten Flow #2 warning; accurate getProfile / getEntityData notes
docs/api/authentication/service.md Clarify authStrategies vs OAuth config
docs/guides/security.md OAuth/SSO bullet with link
docs/guides/basics/login.md Note generator keeps OAuth out of authStrategies
docs/guides/cli/authentication.md Same for CLI-generated setup
docs/guides/cli/default.json.md Short config distinction
docs/cookbook/authentication/google.md Redirect does not need authStrategies
docs/cookbook/authentication/facebook.md Verifying getProfile required if in authStrategies
docs/cookbook/authentication/firebase.md Show authStrategies + why verification makes it safe

Out of scope

Runtime hardening of OAuthStrategy (reject bare client profile, empty sub, identity-lookup query isolation) is intentionally separate from this docs pass.

Test plan

  • Preview docs site (or review rendered markdown) for oauth, service, and security pages
  • Confirm internal anchors resolve: #configuration-and-security, #getprofile-data-params, #flow
  • Skim cookbooks for broken relative links to the new section

Document that OAuth providers belong under authentication.oauth and
must not be listed in public authStrategies for browser redirect SSO.
Rewrite flow #2 guidance so provider-token login requires a verifying
getProfile, and cross-link guides and cookbooks.
@marshallswain
marshallswain merged commit 15f5ee9 into dove Aug 11, 2026
4 checks passed
@marshallswain
marshallswain deleted the docs/oauth-authstrategies-security branch August 11, 2026 00:19
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