Accept access tokens on protected routes; persist OIDC state #57
Reference in New Issue
Block a user
Delete Branch "fix/access-token-auth-backend"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Release 1 of 2 for the auth fix (phase 0a in docs/desktop-client.md). Backend only; the access-token frontend follows in a separate PR once this is live on both colors.
Changes
@jwt_access_required(blueprints/users/decorators.py): accepts the access token, and for now also the refresh token, so the current frontend (refresh token on every call) keeps working. Used on all protected routes and insideadmin_required./api/user/refreshstays refresh-only.oidc_statestable (10 min TTL, single-use), so a login that spans a blue/green flip no longer fails with "Invalid or expired state". The unusedredirect_after_loginis dropped.16_..._add_oidc_states(aerich-generated): additive table; also contains aerich's no-op JSONB→JSONB ALTERs onusers.ldap_groupsandbeli_restaurants.cuisine/tags.Deploy
make redeploy; startup runsaerich upgrade(createsoidc_states).Test plan
pytest tests/ -q: 118 passed🤖 Generated with Claude Code