Mongo
Implements
- unknown
Index
Constructors
Methods
- addEmail
- addEmailVerificationToken
- addLoginToken
- addResetPasswordToken
- createSession
- createUser
- findPasswordHash
- findSessionById
- findSessionByToken
- findUserByEmail
- findUserByEmailVerificationToken
- findUserById
- findUserByLoginToken
- findUserByResetPasswordToken
- findUserByServiceId
- findUserByUsername
- invalidateAllSessions
- invalidateSession
- removeAllLoginTokens
- removeAllResetPasswordTokens
- removeEmail
- setPassword
- setService
- setUserDeactivated
- setUsername
- setupIndexes
- unsetService
- updateSession
- verifyEmail
Constructors
constructor
Parameters
dbConn: any
options: AccountsMongoOptions = {}
Returns Mongo
Methods
publicaddEmail
Parameters
userId: string
newEmail: string
verified: boolean
Returns Promise<void>
publicaddEmailVerificationToken
Parameters
userId: string
email: string
token: string
Returns Promise<void>
publicaddLoginToken
Parameters
userId: string
email: string
token: string
Returns Promise<void>
publicaddResetPasswordToken
Parameters
userId: string
email: string
token: string
reason: string
Returns Promise<void>
publiccreateSession
Parameters
userId: string
token: string
connection: ConnectionInformations = {}
optionalextraData: object
Returns Promise<string>
publiccreateUser
Parameters
user: CreateUserServicePassword
Returns Promise<string>
publicfindPasswordHash
Parameters
userId: string
Returns Promise<null | string>
publicfindSessionById
Parameters
sessionId: string
Returns Promise<any>
publicfindSessionByToken
Parameters
token: string
Returns Promise<any>
publicfindUserByEmail
Parameters
email: string
Returns Promise<any>
publicfindUserByEmailVerificationToken
Parameters
token: string
Returns Promise<any>
publicfindUserById
Parameters
userId: string
Returns Promise<any>
publicfindUserByLoginToken
Parameters
token: string
Returns Promise<any>
publicfindUserByResetPasswordToken
Parameters
token: string
Returns Promise<any>
publicfindUserByServiceId
Parameters
serviceName: string
serviceId: string
Returns Promise<any>
publicfindUserByUsername
Parameters
username: string
Returns Promise<any>
publicinvalidateAllSessions
Parameters
userId: string
optionalexcludedSessionIds: string[]
Returns Promise<void>
publicinvalidateSession
Parameters
sessionId: string
Returns Promise<void>
publicremoveAllLoginTokens
Parameters
userId: string
Returns Promise<void>
publicremoveAllResetPasswordTokens
Parameters
userId: string
Returns Promise<void>
publicremoveEmail
Parameters
userId: string
email: string
Returns Promise<void>
publicsetPassword
Parameters
userId: string
newPassword: string
Returns Promise<void>
publicsetService
Parameters
userId: string
serviceName: string
service: object
Returns Promise<void>
publicsetUserDeactivated
Parameters
userId: string
deactivated: boolean
Returns Promise<void>
publicsetUsername
Parameters
userId: string
newUsername: string
Returns Promise<void>
publicsetupIndexes
Parameters
options: Omit<CreateIndexesOptions, unique | sparse> = {}
Options passed to the mongo native
createIndex
method.
Returns Promise<void>
publicunsetService
Parameters
userId: string
serviceName: string
Returns Promise<void>
publicupdateSession
Parameters
sessionId: string
connection: ConnectionInformations
optionalnewToken: string
Returns Promise<void>
publicverifyEmail
Parameters
userId: string
email: string
Returns Promise<void>
Setup the mongo indexes needed.