Skip to content

Latest commit

 

History

History
37 lines (21 loc) · 1.39 KB

File metadata and controls

37 lines (21 loc) · 1.39 KB

elections-cpl.api.hscc.bdpa.orgDocs


elections-cpl.api.hscc.bdpa.org / lib/next-auth/token / getTokenByDerivation

Function: getTokenByDerivation()

getTokenByDerivation(__namedParameters): Promise<PublicAuthEntry>

Returns the full token entry (token, scheme, and attributes) in the well-known "auth" MongoDB collection that matches the given token and scheme provided via from.

Throws InvalidSecretError if invalid/missing data is provided.

Parameters

__namedParameters

__namedParameters.allowedSchemes?: "bearer" | "bearer"[]

Accepted authentication schemes. By default, all schemes are accepted.

__namedParameters.from: undefined | string | Token

If from is an object, it will be passed as authData to deriveSchemeAndToken. Otherwise, if from is a string, it will be passed as authString to deriveSchemeAndToken.

Returns

Promise<PublicAuthEntry>

Source

lib/next-auth/token.ts:468