Type Alias: AuthServerDiscoveryConfig
type AuthServerDiscoveryConfig = {
issuer: string;
type: AuthServerType;
};
Discovery configuration for the remote authorization server.
Use this when you want the metadata to be fetched on-demand via discovery when first needed. This is useful for edge runtimes like Cloudflare Workers where top-level async fetch is not allowed.
Example
const mcpAuth = new MCPAuth({
protectedResources: {
metadata: {
resource: 'https://api.example.com',
authorizationServers: [
{ issuer: 'https://auth.logto.io/oidc', type: 'oidc' }
],
scopesSupported: ['read', 'write'],
},
},
});
Properties
issuer
issuer: string;
The issuer URL of the authorization server. The metadata will be fetched from the well-known endpoint derived from this issuer.
type
type: AuthServerType;
The type of the authorization server.
See
AuthServerType for the possible values.