sonda/internal/api
Repository files (latest commit first)
Filename Latest commit message Latest commit date
tgiachi 52d1828b46 fix(auth): a token stops working when its account is deleted
SQLite gives the highest user id again after that user is deleted, and an access
token lives for minutes, so the token of a deleted user worked as whoever got the
id next (settings, taste, listens, account).

requireAuth now looks the account up after checking the token and refuses it when
the account is gone, has another name, or was created after the token was signed.
The token carries its issue time for this.

Tests: a unit test of every case, and the real scenario on SQLite (delete the
highest id, create another user, the old token gets 401, the new one works).

Closes #30
2026-11-11 19:25:09 +01:00
..
http fix(auth): a token stops working when its account is deleted 2026-11-11 19:25:09 +01:00
openapi fix(settings): strict body, deleted-account race, doc wording 2026-11-11 19:20:42 +01:00