buildAuthUrl
buildAuthUrl(
discovery,config,pkce,state,nonce,extraParams?):string
Defined in: packages/core/src/authorize.ts:26
Builds the full authorization endpoint URL with all required query parameters.
Includes PKCE challenge, state, nonce, and any caller-supplied extra parameters.
Uses response_type=code and code_challenge_method=S256.
Parameters
Section titled “Parameters”discovery
Section titled “discovery”The provider’s parsed discovery document.
config
Section titled “config”Client configuration; redirectUri is required for this call.
The PKCE verifier/challenge pair (only challenge is sent to the provider).
challenge
Section titled “challenge”string
verifier
Section titled “verifier”string
string
An opaque CSRF-protection value to round-trip through the callback.
string
A random value binding the resulting ID token to this session.
extraParams?
Section titled “extraParams?”Record<string, string>
Optional additional query parameters to append to the URL.
Returns
Section titled “Returns”string
The complete authorization URL to redirect the user to.
Throws
Section titled “Throws”MISSING_REDIRECT_URI if config.redirectUri is not set.
- RFC 6749 §4.1.1 — Authorization Request
- RFC 7636 §4.3 — code_challenge and code_challenge_method
- OpenID Connect Core 1.0 §3.1.2.1 — Authentication Request