MCP Server Framework - v1.0.0
    Preparing search index...

    Interface OidcProviderOptions

    Options for createOidcProvider.

    interface OidcProviderOptions {
        clientId: string;
        clientSecret: string;
        discoveryTtlMs?: number;
        grantedScopes?: readonly string[];
        issuer: string;
        mapUserInfo?: (
            token: string,
            data: Record<string, unknown>,
        ) => Promise<AuthInfo>;
        serverUrl: string;
        upstreamScopes?: readonly string[];
    }
    Index

    Properties

    clientId: string

    Client ID registered with the OIDC provider

    clientSecret: string

    Client secret registered with the OIDC provider

    discoveryTtlMs?: number

    TTL for the cached OIDC discovery document in milliseconds. The discovery document is re-fetched when the TTL expires.

    3600000 (1 hour)
    
    grantedScopes?: readonly string[]

    MCP scopes granted to authenticated users. If not provided, the default mapUserInfo grants no scopes (empty array). When providing a custom mapUserInfo, this option is ignored.

    issuer: string

    OIDC issuer URL (e.g. https://auth.example.com). The discovery document is fetched from {issuer}/.well-known/openid-configuration.

    mapUserInfo?: (
        token: string,
        data: Record<string, unknown>,
    ) => Promise<AuthInfo>

    Custom mapping from OIDC UserInfo response to MCP AuthInfo.

    When not provided, the default mapping uses standard OIDC claims:

    • subclientId
    • grantedScopesscopes
    • 1h artificial expiresAt (token is re-verified on each request)
    • name, email, preferred_usernameextra
    serverUrl: string

    MCP server base URL (e.g. http://localhost:8000). Used as redirect_uri target.

    upstreamScopes?: readonly string[]

    Scopes to request from the upstream OIDC provider.

    ['openid', 'profile', 'email']