mode: 'remote' proxies to one mandatory upstream IdP. GET /oauth/authorize
redirects straight to that IdP (no FrontMCP login page, no provider-selection
page). FrontMCP exchanges the returned code, stores the upstream tokens
(encrypted), derives the session identity from the upstream user, mints its
own HS256 session token, and exposes the upstream token to tools via
this.orchestration.getToken('<provider-id>'). A pre-registered clientId
is required today (DCR is not yet wired — see below).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
| Option | Type | Default | Description |
|---|---|---|---|
provider | string | Required | Upstream IdP base URL |
clientId | string | Required | Pre-registered client ID |
clientSecret | string | - | Client secret (confidential clients) |
scopes | string[] | ['openid'] | Scopes to request from IdP |
providerConfig | ProviderConfig | - | Endpoint overrides and IdP-specific settings |
consent | ConsentConfig | { enabled: false } | Consent UI configuration |
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
Reading the Upstream Token
The upstream IdP token is stored server-side (encrypted) and read by tools via the orchestration accessor — it is never exposed to the LLM: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 throughthis.context.authInfo (or, for typed access, this.auth.claims).
Multi-Provider Proxy
Proxy multiple IdPs under one FrontMCP instance:Each app’s upstream token is stored server-side (encrypted). With
progressive authorization enabled
(
auth.incrementalAuth), users authorize apps one at a time: the minted token’s
authorized_apps claim gates which apps a call may reach, and an incremental authorize
expands that claim (a fresh token with the union of granted apps) without re-authorizing
the apps already granted.Proxy vs Direct Comparison
| Aspect | OAuth Proxy | Direct (Transparent) |
|---|---|---|
| Token Issuer | FrontMCP | Upstream IdP |
| JWKS | FrontMCP-managed | IdP-managed |
| Session Control | Full | Pass-through |
| Custom Claims | Yes | No |
| Consent UI | Optional | No |
| DCR Required | No | Yes (or pre-registered) |
| Complexity | Higher | Lower |
Security Considerations
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
Callback fails with state mismatch
Callback fails with state mismatch
- Ensure session storage is configured (Redis for multi-instance)
- Check that pending authorization TTL hasn’t expired
- Verify the state parameter is being preserved
Upstream token exchange fails
Upstream token exchange fails
- Verify client credentials are correct
- Check that redirect URI matches exactly (including trailing slash)
- Ensure scopes requested are allowed by IdP configuration
User info not available
User info not available
- Confirm
openidandprofilescopes are requested - Check userinfo endpoint is accessible
- Verify IdP returns expected claims
Refresh token not working
Refresh token not working
- Some IdPs require
offline_accessscope 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