Skip to content

exchangeCodeForToken

reference
1 min readUpdated

Kind: Function

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

Exchange the authorization code for a token, directly from the browser.

No client_secret is sent — this is a public client, and PKCE's verifier is what proves the exchange belongs to the request that started it.

Signature

ts
async function exchangeCodeForToken(exchange: TokenExchange): Promise<OAuth2Grant>

Parameters

NameType
exchangeTokenExchange

Returns: Promise<OAuth2Grant>

Was this page helpful?

Download as PDF