Skip to content

SessionStore

Defined in: packages/auth/src/session/session-store.ts:8

Key/value store backing sessions and one-time OAuth state.

The package defines only the interface; the host application provides a concrete implementation (Postgres in the standard profile). Unit tests use an in-memory fake. Every write carries an explicit TTL so entries cannot leak.

delete(key): Promise<void>

Defined in: packages/auth/src/session/session-store.ts:11

string

Promise<void>


get(key): Promise<string | null>

Defined in: packages/auth/src/session/session-store.ts:10

string

Promise<string | null>


getDelete(key): Promise<string | null>

Defined in: packages/auth/src/session/session-store.ts:16

Atomically read a key and delete it, returning the prior value (or null). Used for one-time OAuth state so a callback cannot be replayed.

string

Promise<string | null>


set(key, value, ttlSeconds): Promise<void>

Defined in: packages/auth/src/session/session-store.ts:9

string

string

number

Promise<void>