Skip to content

fix(go): port auth profile and password endpoints from app.ts - #320

Merged
gnacho merged 1 commit into
mainfrom
fix/auth-profile-password
Oct 23, 2026
Merged

gnacho merged 1 commit into
mainfrom
fix/auth-profile-password

Conversation

@gnacho

@gnacho gnacho commented Oct 23, 2026

Copy link
Copy Markdown
Owner

Production bug: changing language or profile settings returned 404 ("No se ha podido guardar el perfil") because PUT /api/auth/profile and PUT /api/auth/password were never ported - they live in app.ts, which the routes-parity script did not include as a source (it only covered the routes-*.ts files).

  • Both endpoints ported with the exact TS validation (partial profile schema, display_name null coercion, email/color/language checks, password min lengths, AUTH_WRONG_CURRENT_PASSWORD) and round-trip tests.
  • The other sessions of the user are invalidated on password change; the current one survives (issue Session lost on browser User-Agent change; add sliding session expiration #251 semantics).
  • scripts/verify-routes.mjs now includes app.ts as a source and matches MethodFunc registrations: full parity assertion at 117 routes + the documented /api/auth/recover addition.

Deploy note: this is a server-only fix (binary), no frontend change.

PUT /api/auth/profile (partial profile update with zod-equivalent validation, display_name null coercion, users SSE broadcast) and PUT /api/auth/password (change with current-password check, other sessions invalidated) were never ported: they live in app.ts, which the routes-parity script did not cover. This broke language/profile changes in production (404). Both endpoints ported with round-trip tests, and the parity script now includes app.ts plus MethodFunc registrations, closing the gap (117 routes, full parity).
@gnacho
gnacho merged commit da290f4 into main Oct 23, 2026
4 checks passed
@gnacho
gnacho deleted the fix/auth-profile-password branch October 23, 2026 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant