Skip to main content

Interface: AdapterSession

adapters.AdapterSession

The session object implementing this interface is is used to look up the user in the database.

Properties​

expires​

• expires: Date

The absolute date when the session expires.

If a session is accessed prior to its expiry date, it will be extended based on the maxAge option as defined in by SessionOptions.maxAge. It is never extended more than once in a period defined by SessionOptions.updateAge.

If a session is accessed past its expiry date, it will be removed from the database to clean up inactive sessions.


sessionToken​

• sessionToken: string

A randomly generated value that is used to get hold of the session.


userId​

• userId: string

Connects the active session to a user in the database