Skip to content

Conversation

@dcramer
Copy link
Member

@dcramer dcramer commented Jan 26, 2026

Add /.well-known/oauth-authorization-server discovery endpoint per RFC 8414 that returns JSON metadata describing the OAuth authorization server's configuration.

This enables OAuth clients to automatically discover Sentry's supported capabilities without hardcoding configuration, improving interoperability and supporting OAuth 2.1 compliance.

The metadata document includes:

  • Issuer identifier and all OAuth endpoint URLs (authorize, token, userinfo, device code)
  • Supported grant types: authorization_code, refresh_token, urn:ietf:params:oauth:grant-type:device_code
  • PKCE support with S256 only (per security best practices)
  • Token endpoint authentication methods: client_secret_basic, client_secret_post, none
  • All available scopes from SENTRY_SCOPES

Response is cached for 1 hour with public cache headers.

Refs #99002

Add /.well-known/oauth-authorization-server discovery endpoint that
returns JSON metadata describing the OAuth authorization server's
configuration. This allows clients to automatically discover supported
grant types, PKCE methods, authentication methods, and endpoint URLs.

The metadata includes:
- Issuer identifier and all OAuth endpoint URLs
- Supported grant types (authorization_code, refresh_token, device_code)
- PKCE support (S256 only)
- Client authentication methods
- Available scopes

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Jan 26, 2026
@dcramer dcramer requested review from BYK and betegon January 26, 2026 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

2 participants