MongoSessionsOptions
Index
Properties
optionalconvertSessionIdToMongoObjectId
database
Mongo database object.
optionaldateProvider
Function that generate the date for the timestamps.
Default to (date?: Date) => (date ? date.getTime() : Date.now())
.
Type declaration
Parameters
optionaldate: Date
Returns any
optionalidProvider
Function that generate the id for new User objects.
Type declaration
Returns string | object
optionalidSessionProvider
Function that generates the _id for new Session objects. If 'undefined' then 'convertSessionIdToMongoObjectId' must be 'true'. Default 'undefined'
Type declaration
Returns string | object
optionalsessionCollectionName
The sessions collection name. Default 'sessions'.
optionaltimestamps
The timestamps for the sessions collection. Default 'createdAt' and 'updatedAt'.
Type declaration
createdAt: string
updatedAt: string
Should the session collection use _id as string or ObjectId. If 'false' must include an 'idSessionProvider'. Default 'true'.