From b8ac4e7b1ffd5be4e1de999dca78762ec0608a44 Mon Sep 17 00:00:00 2001 From: M1 Date: Tue, 17 Mar 2026 06:22:16 +0400 Subject: [PATCH] fix: redirect loop on stale cookie, login broken for 64-char keys, stale docs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - /dashboard now validates key before redirecting to /home — bad/old keys clear the cookie and show login instead of looping - Login form: remove old 4-group auto-formatter, fix maxlength 19→64, fix min length validation 19→10, update placeholder - New key display: break-all so 64-char hex wraps properly - docs.html: update example key format and description --- apps/web/src/dashboard/docs.html | 6 +++--- apps/web/src/dashboard/index.html | 17 +++++------------ apps/web/src/routes/dashboard.ts | 10 ++++++++-- 3 files changed, 16 insertions(+), 17 deletions(-) diff --git a/apps/web/src/dashboard/docs.html b/apps/web/src/dashboard/docs.html index 2091e9e..6677270 100644 --- a/apps/web/src/dashboard/docs.html +++ b/apps/web/src/dashboard/docs.html @@ -103,9 +103,9 @@

All API requests require an account key passed as a Bearer token:

http
-
Authorization: Bearer XXXX-XXXX-XXXX-XXXX
+
Authorization: Bearer <your-64-char-hex-key>
-

Create an account at /dashboard or via the API. Keys are 16-character hex strings formatted as four groups.

+

Create an account at /dashboard or via the API. Keys are 64-character hex strings (256-bit). Shown once at registration — store them securely.

@@ -121,7 +121,7 @@
json — response
-
{ "key": "B8AE-9621-A963-F652", "email_registered": true }
+
{ "key": "5bf5311b56d09254c8a1f0e3...", "email_registered": true }

Update Email

diff --git a/apps/web/src/dashboard/index.html b/apps/web/src/dashboard/index.html index 00c7d03..02010b1 100644 --- a/apps/web/src/dashboard/index.html +++ b/apps/web/src/dashboard/index.html @@ -21,9 +21,9 @@
- +