Skip to content

JwtVerifier

new JwtVerifier(o?): JwtVerifier

JwtVerifierOptions = {}

JwtVerifier

check(token, a): Promise<JwtUser | "unavailable" | null>

As verify(), but “unavailable” when the provider’s keys could not be fetched (slow, down, DNS): not the token’s fault, so try again later.

unknown

JwtAuth

Promise<JwtUser | "unavailable" | null>


verify(token, a): Promise<JwtUser | null>

The user of a valid token for this provider, or null. Never throws. (check() tells a bad token apart from keys that could not be fetched.)

unknown

JwtAuth

Promise<JwtUser | null>