auth/session_lifecycle.ts

Session lifecycle — creation and cookie management shared across login and bootstrap flows.

Declarations
#

2 declarations

view source

create_session_and_set_cookie
#

CreateSessionAndSetCookieOptions
#

auth/session_lifecycle.ts view source

CreateSessionAndSetCookieOptions

keyring

Keyring for cookie signing.

type Keyring

deps

Query deps (needs db for session creation).

c

Hono context for setting the cookie.

type Context

account_id

The account to create a session for.

type string

session_options

Session cookie configuration.

type SessionOptions<string>

max_sessions

Per-account session cap (null to skip enforcement).

type number | null

Depends on
#

Imported by
#