feat(auth-local): local accounts and server-side sessions #56

Closed
opened 2026-11-16 10:00:06 +00:00 by claude-bot · 0 comments
Member

Need

An application that signs users in with @quatrain/auth-oidc-client still has to open its own session afterwards, and an application without an external identity provider needs password accounts. Neither exists in Core today: the only adapters delegate both to a hosted service.

Proposal

A new package @quatrain/auth-local, an adapter of @quatrain/auth:

  • password accounts hashed with scrypt (self-describing hash string, rehash detection, constant-time comparison);
  • opaque session tokens, stored hashed, with an absolute lifetime and an idle timeout, revocable one by one or per account;
  • accounts opened from an external identity (issuer, subject), never linked to an existing account by e-mail alone;
  • a storage interface with an in-memory implementation and a PostgreSQL implementation (DDL shipped).

Out of scope: password recovery by e-mail, multi-factor authentication, rate limiting (left to the application).

## Need An application that signs users in with `@quatrain/auth-oidc-client` still has to open its own session afterwards, and an application without an external identity provider needs password accounts. Neither exists in Core today: the only adapters delegate both to a hosted service. ## Proposal A new package `@quatrain/auth-local`, an adapter of `@quatrain/auth`: - password accounts hashed with scrypt (self-describing hash string, rehash detection, constant-time comparison); - opaque session tokens, stored hashed, with an absolute lifetime and an idle timeout, revocable one by one or per account; - accounts opened from an external identity (`issuer`, `subject`), never linked to an existing account by e-mail alone; - a storage interface with an in-memory implementation and a PostgreSQL implementation (DDL shipped). Out of scope: password recovery by e-mail, multi-factor authentication, rate limiting (left to the application).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
quatrain/core#56
No description provided.