mirror of
https://github.com/bitbaum/datacat.git
synced 2026-12-04 18:18:18 +01:00
* feat(auth): every way in, on @bitbaum/accountkit, keeping every account
Sign-in offered email and password and Continue with OrangeCat, on
next-auth. It now runs on AccountKit's runtime and screens: email and
password, the emailed sign-in link, passkeys, two-step codes, recovery,
OrangeCat and the shared sign-in (Google, Apple, GitHub, X, Facebook), each
shown once configured. /account holds passkeys, two-step codes, the
password, sign-in methods and deletion. next-auth, the hand-rolled
OrangeCat resolver and the unused /api/v1/auth/{login,register} are gone.
Every account is kept. The Prisma migration 20261101120000 adds
AccountKit's tables (auth_ prefix, modelled in schema.prisma so Prisma
never proposes dropping them) and imports each person under the same id:
the bcrypt / $bs1$ hash (legacyBcrypt) and the OrangeCat link keyed on the
sub, with AccountKit's own placeholder for a person without an address.
A trigger mirrors anyone the old server creates during the cutover. It is
re-runnable and refuses addresses that collide once lower-cased.
/api/v1/* takes the session cookie or the API token /api/account mints in
the format the Express backend verifies. The session key is
BETTER_AUTH_SECRET, or derived from the secret the box already holds.
CI: a new browser-smoke job rehearses the import twice (counts, no Prisma
drift) and drives Chromium through an imported account signing in with
its old password, sign-up, sign-out, a refused wrong password, sign-in,
recovery through the reset link, both API auth paths and every way in at
320, 390 and 1280px.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmuJhiHPASaR5k8raL9
* test(browser): give the first article visit on next dev a compile-sized wait
The shared-article suite runs on next dev, which compiles a route on its
first visit. The account route (better-auth, pg) now compiles beside the
article for the header, so the first click can outlast the default 5s.
A production server answers at once; the account journey checks that.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmuJhiHPASaR5k8raL9
* ci: re-run checks on the latest head
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmuJhiHPASaR5k8raL9
---------
Co-authored-by: Claude <noreply@anthropic.com>