メインコンテンツまでスキップ

Function: beginAuthorization()

beginAuthorization(config, hints?, opts?): Promise<PendingAuthorization>

Build the issuer authorization URL for an authorization-code + PKCE login and the PendingAuthorization state that must be persisted across the redirect. Generates fresh state, nonce, and PKCE verifier; only the S256 challenge leaves the client.

Parameters​

config​

AuthConfig

Issuer, client, redirect URI, and optional scope.

hints?​

AuthorizationHints

Optional connection / login-hint to skip the issuer's provider chooser.

opts?​

statePrefix?​

string

Prepended to the generated state (see POPUP_LOGIN_STATE_PREFIX).

Returns​

Promise<PendingAuthorization>

The pending authorization to store before navigating to authorizeUrl.

Remarks​

Most integrations should use createUpbond instead.