Skip to main content
FrontMCP’s three authentication modes address different deployment scenarios. Understanding when to use each mode is critical for both security and developer experience.

Mode Overview

Mode Comparison

FeaturePublicTransparentOrchestrated
Token RequiredNoYes (external)Yes (FrontMCP-issued)
User IdentityAnonymousFrom upstream IdPFrom login or upstream
JWKS SourceSelf-generatedUpstream IdPSelf-generated
Session ManagementMinimalPass-throughFull control
Multi-providerNoSingle providerMultiple providers
Progressive AuthNoNoYes
Consent UINoNoOptional

Public Mode

No authentication required. All requests receive an anonymous session.
const auth: AuthOptionsInput = {
  mode: 'public',
  sessionTtl: 3600, // 1 hour
  anonymousScopes: ['anonymous'],
};

How It Works

Configuration Options

OptionTypeDefaultDescription
sessionTtlnumber3600Session lifetime in seconds
anonymousScopesstring[]['anonymous']Scopes assigned to anonymous sessions
publicAccess.toolsstring[] | 'all''all'Tools accessible without auth
publicAccess.promptsstring[] | 'all''all'Prompts accessible without auth
publicAccess.rateLimitnumber60Rate limit per IP per minute

Use Cases

Development

Rapid prototyping without auth setup overhead

Public APIs

Endpoints that don’t require user identity
Do NOT use public mode when you need:
  • User identity tracking
  • Audit trails
  • Access control per user
  • Compliance requirements

Transparent Mode

Pass-through tokens from an external identity provider. FrontMCP validates tokens but doesn’t issue them.
const auth: AuthOptionsInput = {
  mode: 'transparent',
  remote: {
    provider: 'https://auth.example.com',
    jwksUri: 'https://auth.example.com/.well-known/jwks.json',
  },
  expectedAudience: 'https://api.myservice.com',
  requiredScopes: ['openid'],
  allowAnonymous: false,
};

How It Works

Configuration Options

OptionTypeDefaultDescription
remote.providerstringRequiredBase URL of the IdP
remote.jwksUristringAuto-discoveredCustom JWKS endpoint
remote.jwksJSONWebKeySet-Inline JWKS for offline verification
expectedAudiencestring | string[]Issuer URLRequired audience claim value(s)
requiredScopesstring[][]Scopes that must be present
allowAnonymousbooleanfalseAllow requests without tokens

Provider Examples

auth: {
  mode: 'transparent',
  remote: {
    provider: 'https://your-tenant.auth0.com',
    // JWKS discovered automatically from /.well-known/jwks.json
  },
  expectedAudience: 'https://api.yourservice.com',
}

Use Cases

Existing IdP Integration

Your organization already uses Auth0, Okta, or similar

Single Provider

All users authenticate through one identity provider
Do NOT use transparent mode when you need:
  • Multiple identity providers
  • Progressive authorization (add apps over time)
  • Server-side token storage with silent refresh
  • Custom token claims

Orchestrated Mode

FrontMCP acts as a full OAuth 2.1 authorization server. This mode has two types: local and remote.

Local Type

Self-contained auth server with built-in user management.
const auth: AuthOptionsInput = {
  mode: 'orchestrated',
  type: 'local',
  consent: { enabled: true },
  sessionMode: 'stateful',
  tokenStorage: { type: 'memory' }, // Use 'redis' in production
};
The built-in login page accepts any email format without validation. Replace with a real identity provider for production use.

Remote Type

Local auth server that proxies user authentication to an upstream IdP.
const auth: AuthOptionsInput = {
  mode: 'orchestrated',
  type: 'remote',
  remote: {
    provider: 'https://auth.example.com',
    clientId: 'your-client-id',
    clientSecret: 'your-client-secret',
    scopes: ['openid', 'profile', 'email'],
  },
  consent: { enabled: true },
  sessionMode: 'stateful',
};

How It Works

Configuration Options

OptionTypeDefaultDescription
type'local' | 'remote'RequiredSelf-contained or upstream proxy
consentConsentConfig{ enabled: false }Consent UI configuration
sessionMode'stateful' | 'stateless''stateful'Token storage strategy
tokenStorage.type'memory' | 'redis''memory'Storage backend
allowDefaultPublicbooleanfalseAllow unauthenticated requests
incrementalAuthIncrementalAuthConfig{ enabled: true }Progressive authorization
consent: {
  enabled: true,
  groupByApp: true,           // Group tools by app in UI
  showDescriptions: true,     // Show tool descriptions
  allowSelectAll: true,       // Allow selecting all tools
  requireSelection: true,     // Require at least one tool
  rememberConsent: true,      // Remember for future sessions
  excludedTools: ['health'],  // Always available tools
}

Incremental Authorization

incrementalAuth: {
  enabled: true,
  allowSkip: true,                    // Allow skipping app auth
  showAllAppsAtOnce: true,            // Show all apps in one page
  skippedAppBehavior: 'require-auth', // 'anonymous' or 'require-auth'
}

OAuth Endpoints

Orchestrated mode exposes standard OAuth endpoints:
EndpointMethodDescription
/oauth/authorizeGETStart authorization flow
/oauth/tokenPOSTExchange code for tokens
/oauth/registerPOSTDynamic Client Registration
/oauth/userinfoGETUser profile information
/.well-known/oauth-authorization-serverGETServer metadata
/.well-known/jwks.jsonGETPublic signing keys

Use Cases

Multi-Provider Federation

Combine multiple IdPs under one session (Slack + GitHub + custom)

Progressive Authorization

Users authorize apps incrementally as needed

Full Token Control

Custom token lifetimes, scopes, and refresh behavior

Built-in Consent UI

Let users choose which tools/resources to grant
Do NOT use orchestrated mode when:
  • You only have one IdP and don’t need federation
  • You want to minimize auth complexity
  • Running multiple instances without Redis

Mode Selection Flowchart


Security Comparison

Security AspectPublicTransparentOrchestrated
Token VerificationNoneAgainst upstream JWKSAgainst local JWKS
PKCE SupportN/ADepends on IdPAlways S256
Refresh Token RotationN/ADepends on IdPAlways rotated
Key ManagementAuto-generatedUpstream-managedSelf-managed
Consent UINoNoOptional
Session RevocationN/AN/ASupported

Token Verification Flow


Next Steps