MongoServiceMagicLink
Implements
- unknown
Index
Constructors
Methods
Constructors
constructor
Parameters
options: MongoServiceMagicLinkOptions
Returns MongoServiceMagicLink
Methods
publicaddLoginToken
Parameters
userId: string
Id used to update the user.
email: string
Which address of the user's to link the token to.
token: string
Random token used to allow user to login.
Returns Promise<void>
publicfindUserByLoginToken
Find a user from a login token.
Parameters
token: string
Random token used to allow user to login.
Returns Promise<any>
publicremoveAllLoginTokens
Remove all the login tokens for a user.
Parameters
userId: string
Id used to update the user.
Returns Promise<void>
publicsetupIndexes
Setup the mongo indexes needed for the token service.
Parameters
options: Omit<CreateIndexesOptions, unique | sparse> = {}
Options passed to the mongo native
createIndex
method.
Returns Promise<void>
Add a login token to a user.