Products · Identity V2

Passwordless login, built by hand

Magic links, passkeys and sessions on our own identity provider, replacing AWS Cognito.

Planned, not builtModule 9 of 15

DataData ModelSections

Data Model

Design notes from each story. Tables belong to the owning service only.

IDENTITY-V2-E8-01 · Identity schema and session service
New in identity: auth_identities, login_tokens, passkeys, recovery_codes as listed in AC1. identity.sessions (from IDENTITY-V1-E1-03) gains last_seen_at, absolute_expires_at, ip_hash, user_agent, reauthenticated_at. identity.users.cognito_sub becomes nullable.
IDENTITY-V2-E8-02 · Magic link sign-in and sign-up
Uses identity.login_tokens (purpose magic_link). identity.rate_limits (key, window_start, count; primary key (key, window_start)) backs the per-email and per-IP limits.
IDENTITY-V2-E8-03 · Email one-time code fallback
identity.login_tokens adds code_hash, attempts (purpose email_code).
IDENTITY-V2-E8-04 · Passkeys: register and sign in
Uses identity.passkeys; adds backed_up boolean, backup_eligible boolean. identity.webauthn_challenges (id, user_id null, challenge, purpose, expires_at).
IDENTITY-V2-E8-05 · Recovery codes
Uses identity.recovery_codes; a regenerate deletes the user's old rows in the same transaction.
IDENTITY-V2-E8-06 · Session management page
No schema change; reads identity.sessions.
IDENTITY-V2-E8-07 · Re-authentication for sensitive actions
identity.sessions.reauthenticated_at. identity.email_changes (id, user_id, new_email, token_hash, expires_at, confirmed_at).
IDENTITY-V2-E8-08 · Cognito migration and shutdown
identity.users adds migrated_at. After cutoff, a migration drops cognito_sub.
IDENTITY-V2-E8-09 · Auth security hardening
No schema change.
IDENTITY-V2-E8-10 · Account security on our own screens
No schema change.
IDENTITY-V2-E8-11 · Deactivate first, delete after 30 days
identity.users adds deactivated_at and deletes_at (both empty unless deactivated). A partial index on deletes_at serves the daily job.
IDENTITY-V2-E8-12 · Rotate service client secrets without downtime
identity.service_client_secrets (id, client_id → service_clients, secret_hash unique, created_at, last_used_at, retired_at), replacing service_clients.secret_hash. A partial unique rule allows at most two active secrets per client.

Coming Soon...

The entities, their relationships, what every field means and the business rules will appear here when this module's design is finalized.