Skip to main content
Some identity providers don’t support Dynamic Client Registration (DCR). FrontMCP’s OAuth proxy bridges this gap by acting as a local OAuth server while delegating user authentication to the upstream IdP.

When to Use OAuth Proxy

Use Proxy When

  • IdP doesn’t support DCR
  • Need custom token claims
  • Want unified auth endpoints
  • Require consent UI layer

Use Direct When

  • IdP supports DCR (Auth0, Okta)
  • Simple pass-through needed
  • No custom claims required
  • Direct transparent mode works

How It Works

The proxy maintains:
  • Client registration with pre-provisioned credentials
  • JWKS for signing FrontMCP tokens
  • Session state linking upstream tokens to local sessions
  • Token vault storing upstream tokens for API calls

Configuration

Basic Setup

Configuration Options


Endpoint Overrides

For non-standard IdPs, override auto-discovered endpoints:

Inline JWKS

For IdPs without a JWKS endpoint:

Token Management

Upstream Token Storage

The proxy stores upstream IdP tokens in the token vault:

Automatic Refresh

When upstream tokens expire, the proxy handles refresh:

Custom Claims

Custom claims are sourced from the upstream identity provider. Configure your IdP to include the claims you need on the upstream JWT (department, employee_id, roles, etc.); FrontMCP forwards them through this.context.authInfo (or, for typed access, this.auth.claims).

Multi-Provider Proxy

Proxy multiple IdPs under one FrontMCP instance:
Each app maintains its own upstream token in the vault. Users authenticate once per app via progressive authorization.

Proxy vs Direct Comparison


Security Considerations

Store client secrets securely. Never commit secrets to version control. Use environment variables or a secrets manager.
Validate redirect URIs - Ensure callback URLs are registered with the upstream IdP
Use HTTPS - All communication with upstream IdP must be encrypted
Rotate secrets - Periodically rotate client secrets
Monitor token usage - Log and alert on unusual token patterns

Troubleshooting

  • Ensure session storage is configured (Redis for multi-instance)
  • Check that pending authorization TTL hasn’t expired
  • Verify the state parameter is being preserved
  • Verify client credentials are correct
  • Check that redirect URI matches exactly (including trailing slash)
  • Ensure scopes requested are allowed by IdP configuration
  • Confirm openid and profile scopes are requested
  • Check userinfo endpoint is accessible
  • Verify IdP returns expected claims
  • Some IdPs require offline_access scope for refresh tokens
  • Check if IdP rotates refresh tokens (handle rotation)
  • Verify refresh token hasn’t been revoked

Next Steps

Remote OAuth

Direct IdP integration without proxy

Progressive Authorization

Incremental app authorization

Production Checklist

Security requirements for deployment

Tokens & Sessions

Token lifecycle management