Skip to main content

AccountsMongoOptions

Index

Properties

optionalcaseSensitiveUserName

caseSensitiveUserName?: boolean

Perform case intensitive query for user name. Default 'true'.

optionalcollectionName

collectionName?: string

The users collection name. Default 'users'.

optionalconvertSessionIdToMongoObjectId

convertSessionIdToMongoObjectId?: boolean

Should the session collection use _id as string or ObjectId. Default 'true'.

optionalconvertUserIdToMongoObjectId

convertUserIdToMongoObjectId?: boolean

Should the user collection use _id as string or ObjectId. Default 'true'.

optionaldateProvider

dateProvider?: (date?: Date) => any

Function that generate the date for the timestamps. Default to (date?: Date) => (date ? date.getTime() : Date.now()).


Type declaration

    • (date?: Date): any
    • Parameters

      • optionaldate: Date

      Returns any

optionalidProvider

idProvider?: () => string | object

Function that generate the id for new objects.


Type declaration

    • (): string | object
    • Returns string | object

optionalidSessionProvider

idSessionProvider?: () => string | object

Function that generates the _id for new Session objects. If 'undefined' then 'convertSessionIdToMongoObjectId' must be 'true'. Default 'undefined'


Type declaration

    • (): string | object
    • Returns string | object

optionalsessionCollectionName

sessionCollectionName?: string

The sessions collection name. Default 'sessions'.

optionaltimestamps

timestamps?: { createdAt: string; updatedAt: string }

The timestamps for the users and sessions collection. Default 'createdAt' and 'updatedAt'.


Type declaration

  • createdAt: string
  • updatedAt: string