Function: spendOnce()
function spendOnce(
jti: string,
exp: number,
store: JtiStore): Promise<boolean>;
Defined in: me-client/src/tokens.ts:60 (opens in a new tab)
Spend a verified token's jti so it starts one session: true the first time,
false for a repeat or a token that has expired (exp, in seconds, at or
before now). Call it after verifying the token and before starting your own
session; on false, refuse the sign-in. A store that fails throws, so the
sign-in fails closed.
ParametersLink to this section
| Parameter | Type |
|---|---|
jti | string |
exp | number |
store | JtiStore |
ReturnsLink to this section
Promise<boolean>