Files
accountkit/dist/auth/compat-testing.d.ts.map
CatoandClaude 7bfa28854e feat(auth): one Auth.js compat layer, import rehearsal and test client (#52)
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>
2026-11-01 10:38:17 +01:00

1 line
964 B
Plaintext

{"version":3,"file":"compat-testing.d.ts","sourceRoot":"","sources":["../../src/auth/compat-testing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,8DAA8D;AAC9D,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE;QACL,GAAG,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;QAC7C,IAAI,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;KAC/C,CAAC;CACH;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE;IAC1C,MAAM,EAAE,WAAW,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CACd;kBAqBU,MAAM,SACN,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAC5B,OAAO,CAAC,QAAQ,CAAC;IAsBlB,kEAAkE;YAKhD,MAAM;IAOxB,yEAAyE;qBAE7D,MAAM,UACR,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;aAQW,MAAM;;IAEjD,6EAA6E;;aAMlC,MAAM;;IAEjD,kDAAkD;YACpC,CAAC;cAAW,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;UAAO,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC;IAGzE,0DAA0D;WAC7C,CAAC;cAAW,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;UAAO,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC;IAKxE,mFAAmF;oBACnE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,MAAM,GAAG,IAAI;IAG/C,sDAAsD;iBACzC;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,MAAM,GAAG,IAAI;EAI/C"}