Skip to content

createPkcePair

reference
1 min readUpdated

Kind: Function

Source: atloria-monorepo/packages/ui-core/src/components/api-explorer/oauth2.ts

A PKCE verifier and its S256 challenge.

Refuses rather than falling back to plain when SubtleCrypto is unavailable — which in practice means an insecure context. plain sends the verifier in the authorization request, so it protects against nothing; a flow that cannot be run safely should not be run.

Signature

ts
async function createPkcePair(crypto: CryptoLike): Promise<PkcePair>

Parameters

NameType
cryptoCryptoLike

Returns: Promise<PkcePair>

Was this page helpful?

Download as PDF