Skip to content

Latest commit

 

History

History
32 lines (18 loc) · 1.02 KB

File metadata and controls

32 lines (18 loc) · 1.02 KB

elections-cpl.api.hscc.bdpa.orgDocs


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

Function: getTokenById()

getTokenById(__namedParameters): Promise<PublicAuthEntry>

Returns the full token entry (token, scheme, and attributes) corresponding to the given _id (auth_id) in the well-known "auth" MongoDB collection.

Throws if invalid/missing data is provided.

Parameters

__namedParameters

__namedParameters.auth_id: undefined | string | ObjectId

The ObjectId of the token in the well-known "auth" MongoDb collection. Throws if auth_id cannot be coerced into an ObjectId.

Returns

Promise<PublicAuthEntry>

Source

lib/next-auth/token.ts:438