Skip to content

Require end-user scopes for Gmail OAuth routes#17

Merged
ltyu merged 1 commit intomasterfrom
security/require-user-token-scopes
Mar 21, 2026
Merged

Require end-user scopes for Gmail OAuth routes#17
ltyu merged 1 commit intomasterfrom
security/require-user-token-scopes

Conversation

@ltyu
Copy link
Copy Markdown
Owner

@ltyu ltyu commented Mar 20, 2026

Summary

  • require gmail:connect and gmail:disconnect scopes on the protected OAuth routes at API Gateway
  • reject client-credentials tokens and missing scopes in the JWT-backed app user provider for defense in depth
  • document the new Auth0 API scopes and clarify that machine-to-machine tokens cannot be used for connect or disconnect

Testing

  • pnpm test:run -- src/services/jwtAuthenticatedAppUserProvider.test.ts src/handlers/startGoogleOAuth.test.ts src/handlers/disconnectGoogleOAuth.test.ts
  • pnpm exec tsc --noEmit

Base automatically changed from security/secure-ssm-secrets to master March 20, 2026 20:46
@ltyu ltyu merged commit 4f7ac95 into master Mar 21, 2026
1 check passed
@ltyu ltyu deleted the security/require-user-token-scopes branch March 21, 2026 01:05
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