buildTokenRequest
buildTokenRequest(
discovery,config,code,codeVerifier):HttpRequest
Defined in: packages/core/src/token.ts:17
Builds an HTTP request to exchange an authorization code for tokens (RFC 6749 §4.1.3).
Parameters
Section titled “Parameters”discovery
Section titled “discovery”The OIDC discovery document containing the token endpoint.
config
Section titled “config”Client configuration (clientId, redirectUri, optional clientSecret).
string
The authorization code received from the authorization endpoint.
codeVerifier
Section titled “codeVerifier”string
The PKCE code verifier that matches the code_challenge sent earlier (RFC 7636 §4.5).
Returns
Section titled “Returns”An HttpRequest ready to be sent to the token endpoint.