Files
huly-platform/server
Yulian DiazandGitHub f391dd0a5d Fix: password signup crashes with JSON parse error when MAIL_URL is configured (#10519)
When signing up with a password on deployments with MAIL_URL set, the
account service returns token: undefined to enforce email confirmation.
SignupForm.svelte was calling logIn() unconditionally, which triggered
PUT /cookie without an Authorization header, returning a 401 with an
unparseable body and leaving the user stuck on the signup page.

- Guard logIn() in SignupForm.svelte with `result.token != null`, matching
  the pattern already used in doLoginNavigate() in utils.ts
- Fix PUT /cookie 401 response to use Koa's ctx.status/ctx.body instead of
  raw ctx.res.writeHead/end, so the error body is correctly serialized
- Add unit tests for the token guard logic

Fixes #10518

Signed-off-by: Yulian Diaz <5605867+spatialy@users.noreply.github.com>
2026-02-19 14:09:29 +07:00
..
2025-12-18 00:40:41 +05:00
2025-12-18 00:40:41 +05:00
2025-12-18 00:40:41 +05:00
2025-12-18 00:40:41 +05:00