Skip to main content

Module oauth

Module oauth 

Source
Expand description

OAuth 2.1 Authorization Code + PKCE support.

Forge acts as an OAuth 2.1 Authorization Server for its MCP endpoint. Enable with mcp.oauth = true in forge.toml.

Modules§

pkce
PKCE (Proof Key for Code Exchange) verification.

Structs§

AuthorizationCode
A pending authorization code with PKCE challenge.
OAuthClient
An OAuth 2.1 client registration.

Functions§

generate_random_token
256 bits of CSPRNG entropy (two UUIDv4s), base64url-encoded.
validate_redirect_uri
Validate a redirect URI against a client’s registered URIs.