Function: exchangeNativeCode()
function exchangeNativeCode(input: ExchangeNativeCodeInput, options?: ExchangeNativeCodeOptions): Promise<ExchangeNativeCodeResult>;
Defined in: me-client/src/native.ts:86 (opens in a new tab)
Trade a native sign-in's code for its token (POST <issuer>/api/auth/native/token),
then verify the token against your audience. Each code works once,
whatever the answer. On valid, start your own session as you would for
the popup's token (spendOnce(session.jti, session.exp, store) first). An
outage is a result, never a throw.
ParametersLink to this section
| Parameter | Type |
|---|---|
input | ExchangeNativeCodeInput |
options | ExchangeNativeCodeOptions |
ReturnsLink to this section
Promise<ExchangeNativeCodeResult>