Skip to content

basalt / auth-sqlite/src / SqliteSessionStore

Class: SqliteSessionStore ​

Defined in: auth-sqlite/src/index.ts:364

Implements ​

Constructors ​

Constructor ​

> new SqliteSessionStore(db): SqliteSessionStore

Defined in: auth-sqlite/src/index.ts:365

Parameters ​

db ​

DatabaseSync

Returns ​

SqliteSessionStore

Methods ​

create() ​

> create(userId, ttlMs): Promise<SessionRecord>

Defined in: auth-sqlite/src/index.ts:367

Parameters ​

userId ​

string

ttlMs ​

number

Returns ​

Promise<SessionRecord>

Implementation of ​

SessionStore.create


delete() ​

> delete(id): Promise<boolean>

Defined in: auth-sqlite/src/index.ts:392

Parameters ​

id ​

string

Returns ​

Promise<boolean>

Implementation of ​

SessionStore.delete


deleteAllForUser() ​

> deleteAllForUser(userId): Promise<void>

Defined in: auth-sqlite/src/index.ts:397

Deletes every session for a user — fired on password reset so a reset logs out all of the user's active sessions, not just token-based clients. Optional so existing stores keep compiling; implement it to close the gap.

Parameters ​

userId ​

string

Returns ​

Promise<void>

Implementation of ​

SessionStore.deleteAllForUser


find() ​

> find(id): Promise<SessionRecord | null>

Defined in: auth-sqlite/src/index.ts:378

Returns null for unknown or expired sessions.

Parameters ​

id ​

string

Returns ​

Promise<SessionRecord | null>

Implementation of ​

SessionStore.find

Released under the MIT License.