Skip to content

basalt / auth-prisma/src / PrismaSessionStore

Class: PrismaSessionStore ​

Defined in: auth-prisma/src/index.ts:469

Implements ​

Constructors ​

Constructor ​

> new PrismaSessionStore(client, options?): PrismaSessionStore

Defined in: auth-prisma/src/index.ts:472

Parameters ​

client ​

PrismaAuthClient

options? ​

PrismaAuthStoreOptions = {}

Returns ​

PrismaSessionStore

Methods ​

create() ​

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

Defined in: auth-prisma/src/index.ts:479

Parameters ​

userId ​

string

ttlMs ​

number

Returns ​

Promise<SessionRecord>

Implementation of ​

SessionStore.create


delete() ​

> delete(id): Promise<boolean>

Defined in: auth-prisma/src/index.ts:503

Parameters ​

id ​

string

Returns ​

Promise<boolean>

Implementation of ​

SessionStore.delete


deleteAllForUser() ​

> deleteAllForUser(userId): Promise<void>

Defined in: auth-prisma/src/index.ts:508

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-prisma/src/index.ts:490

Returns null for unknown or expired sessions.

Parameters ​

id ​

string

Returns ​

Promise<SessionRecord | null>

Implementation of ​

SessionStore.find

Released under the MIT License.