AccountsServerOptions <CustomUser>
Index
Properties
optionalambiguousErrorMessages
optionalcreateJwtPayload
Function to add addition information in jwt payload of accessToken
Type declaration
Parameters
data: JwtData
user: CustomUser
Returns Promise<Record<string, any>>
optionalcreateNewSessionTokenOnRefresh
Creates a new session token each time a user refreshes his access token
optionalemailTemplates
optionalenableAutologin
If this flag is set to true - user will be automatically logged in after registration. LoginResult data will be included into registration response. Can be enabled only if requireEmailVerification is set to false. Defaults to false.
optionalimpersonationAuthorize
Type declaration
Parameters
user: User
impersonateToUser: User
Returns Promise<any>
optionalmicro
optionalprepareMail
optionalresumeSessionValidator
Use this function if you want to cancel the current session to be resumed.
The session parameter will be null if the useStatelessSession
option is set to true.
Type declaration
Parameters
user: User
session: Session
Returns Promise<void>
optionalsendMail
optionalsiteUrl
optionaltokenConfigs
Type declaration
optionalaccessToken?: SignOptions
optionalrefreshToken?: SignOptions
optionaltokenCreator
tokenSecret
optionaluseInternalUserObjectSanitizer
Set this false to false
if you wish to skip internal user sanitazing method, and expose
the original User object as-is.
optionaluseStatelessSession
Should the session mechanism be stateless. By default the token is checked against the database in every request. This allow you to revoke a session at any time. Since we are using JWT you can decide to have a stateless session. This means that the token won't be checked against the database on every request. Using the stateless approach will make the server authorisation check faster but this means that you won't be able to able to invalidate the access token until it's expired. Only use this option if you understand the downsides of this approach. Default 'false'.
optionaluserObjectSanitizer
Type declaration
Parameters
user: CustomUser
Returns CustomUser
Return ambiguous error messages from login failures to prevent user enumeration. Defaults to true.