Skip to content

Function: generatePKCEPair()

Function: generatePKCEPair()

generatePKCEPair(crypto, verifierLength?): Promise<PKCEPair>

Defined in: auth-client/src/core/pkce.ts:56

Generate a fresh PKCE pair. Each call returns a cryptographically independent verifier — the SDK pairs one per SSO attempt and discards after exchange.

Parameters

crypto

Crypto

Crypto port for randomBytes + sha256.

verifierLength?

number = DEFAULT_VERIFIER_LENGTH

Override the default 64 chars. Must be 43..128.

Returns

Promise<PKCEPair>