mirror of
https://github.com/bitbaum/accountkit.git
synced 2026-12-04 04:37:08 +01:00
Five products (evig, kivvi, petvity, surf-your-life, loki) each carried a
copy of the same bridge from next-auth/react to the shared runtime, the same
rollback-only rehearsal script and the same journey-test cookie client. They
now live here once.
- auth/nextauth-compat: createNextAuthCompat answers session (GET and POST),
csrf, providers, signout, each credentials callback and signin/<oidc> for
every configured OIDC client, sign-in or link when signed in, plus a
same-origin GET entry for server-side signIn. Only what the screens use is
open; AccountKit's own credential writers answer 404. The product supplies
its session shape, credentials resolvers (an address or a refusal code),
login codes and hooks; it gets sessionFor, sessionIdFor and currentSession.
A signed-out session reads as null, never {}.
- auth/import-rehearsal + the accountkit-rehearse-import command: a
product's import SQL in one transaction that always rolls back, reported
as counts, through the product's pg or postgres driver.
- auth/compat-testing: a cookie-keeping client that speaks what
next-auth/react sends.
test/nextauth-compat.test.js runs them on PGlite with the real runtime.
Claude-Session: https://claude.ai/code/session_019MDtmud6zcK4rStBGmYSML
Co-authored-by: Claude <noreply@anthropic.com>