MongoSessionsOptions

@accounts/mongo-sessionsGlobalsMongoSessionsOptions

Hierarchy

  • MongoSessionsOptions

Index

Properties

Properties

Optional convertSessionIdToMongoObjectId

convertSessionIdToMongoObjectId? : boolean

Defined in mongo-sessions.ts:27

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


database

database: Db

Defined in mongo-sessions.ts:9

Mongo database object.


Optional dateProvider

dateProvider? : function

Defined in mongo-sessions.ts:36

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

Type declaration:

▸ (date?: Date): any

Parameters:

NameType
date?Date

Optional idProvider

idProvider? : function

Defined in mongo-sessions.ts:31

Function that generate the id for new objects.

Type declaration:

▸ (): string | object


Optional sessionCollectionName

sessionCollectionName? : string

Defined in mongo-sessions.ts:14

The sessions collection name. Default 'sessions'.


Optional timestamps

timestamps? : object

Defined in mongo-sessions.ts:19

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

Type declaration:

  • createdAt: string

  • updatedAt: string