sonda/internal/auth
Repository files (latest commit first)
Filename Latest commit message Latest commit date
tgiachi 96ad8b1f62 feat(auth): accounts are identified by an email address
Registration, login and the admin's create-user call take `email` instead of
`username`, and the user object returns `email`. The address is checked for its
shape (a plain address, no display name, at most 254 bytes), trimmed, lowercased
and unique. Sonda sends no mail and does not verify it.

- Migration 0018 renames the users column (and the PostgreSQL index); values are
  kept, so an account made before keeps its plain name and still logs in with it
  (login does not check the shape).
- Error code username_taken becomes email_taken; the JWT claim is now `email`,
  so access tokens issued before the upgrade are refused once and clients refresh.
- OpenAPI spec, README, the web login form (type email), strings (en, it) and
  the generated API types follow.

Closes #65
2026-11-12 14:40:33 +01:00
..
auth_test.go feat(auth): accounts are identified by an email address 2026-11-12 14:40:33 +01:00
password.go feat: add sondad server with config, storage, auth and listening API 2026-11-11 12:06:15 +01:00
service.go feat(auth): accounts are identified by an email address 2026-11-12 14:40:33 +01:00
service_test.go feat(auth): accounts are identified by an email address 2026-11-12 14:40:33 +01:00
token.go feat(auth): accounts are identified by an email address 2026-11-12 14:40:33 +01:00