AccountsServerOptions

@accounts/serverGlobalsAccountsServerOptions

Type parameters

CustomUser: User

Hierarchy

  • AccountsServerOptions

Index

Properties

Properties

Optional ambiguousErrorMessages

ambiguousErrorMessages? : boolean

Defined in packages/server/src/types/accounts-server-options.ts:15

Return ambiguous error messages from login failures to prevent user enumeration. Defaults to true.


Optional createJwtPayload

createJwtPayload? : function

Defined in packages/server/src/types/accounts-server-options.ts:42

Function to add addition information in jwt payload of accessToken

Type declaration:

▸ (data: JwtData, user: CustomUser): Promise‹Record‹string, any››

Parameters:

NameType
dataJwtData
userCustomUser

Optional createNewSessionTokenOnRefresh

createNewSessionTokenOnRefresh? : boolean

Defined in packages/server/src/types/accounts-server-options.ts:38

Creates a new session token each time a user refreshes his access token


Optional db

db? : DatabaseInterface‹CustomUser›

Defined in packages/server/src/types/accounts-server-options.ts:16


Optional emailTemplates

emailTemplates? : EmailTemplatesType

Defined in packages/server/src/types/accounts-server-options.ts:27


Optional enableAutologin

enableAutologin? : boolean

Defined in packages/server/src/types/accounts-server-options.ts:47

If this flag is set to true - user will be automatically logged in after registration. LoginResult data will be included into registration response.


Optional impersonationAuthorize

impersonationAuthorize? : function

Defined in packages/server/src/types/accounts-server-options.ts:29

Type declaration:

▸ (user: User, impersonateToUser: User): Promise‹any›

Parameters:

NameType
userUser
impersonateToUserUser

Optional prepareMail

prepareMail? : PrepareMailFunction

Defined in packages/server/src/types/accounts-server-options.ts:32


Optional resumeSessionValidator

resumeSessionValidator? : ResumeSessionValidator

Defined in packages/server/src/types/accounts-server-options.ts:30


Optional sendMail

sendMail? : SendMailType

Defined in packages/server/src/types/accounts-server-options.ts:33


Optional siteUrl

siteUrl? : string

Defined in packages/server/src/types/accounts-server-options.ts:31


Optional tokenConfigs

tokenConfigs? : object

Defined in packages/server/src/types/accounts-server-options.ts:23

Type declaration:

  • accessToken? : SignOptions

  • refreshToken? : SignOptions


Optional tokenCreator

tokenCreator? : TokenCreator

Defined in packages/server/src/types/accounts-server-options.ts:34


tokenSecret

tokenSecret: string | object

Defined in packages/server/src/types/accounts-server-options.ts:17


Optional useInternalUserObjectSanitizer

useInternalUserObjectSanitizer? : boolean

Defined in packages/server/src/types/accounts-server-options.ts:52

Set this false to false if you wish to skip internal user sanitazing method, and expose the original User object as-is.


Optional userObjectSanitizer

userObjectSanitizer? : UserObjectSanitizerFunction

Defined in packages/server/src/types/accounts-server-options.ts:28