feat: Implement email/password and X OAuth authentication, replacing the dev-login mechanism.

This commit is contained in:
Codex
2026-02-18 14:54:28 +00:00
parent c92032eb72
commit 76f991e690
15 changed files with 410 additions and 147 deletions

View File

@@ -30,13 +30,12 @@ test("clearUserCookie expires session cookie", () => {
assert.match(cookie, /Max-Age=0/);
});
test("getAuthenticatedUserId prefers x-user-id header", () => {
test("getAuthenticatedUserId resolves from cookie only", () => {
const userId = getAuthenticatedUserId({
"x-user-id": "header-user",
cookie: "xartaudio_user=cookie-user",
});
assert.equal(userId, "header-user");
assert.equal(userId, "cookie-user");
});
test("getAuthenticatedUserId falls back to cookie", () => {