Redirect to login on expired/invalid auth
All checks were successful
CI / build (push) Successful in 1m1s
CI / docker (push) Successful in 46s
CI / deploy (push) Successful in 29s

Backend now returns 401 instead of 403 for unauthenticated requests
via HttpStatusEntryPoint. UI middleware handles both 401 and 403,
triggering token refresh and redirecting to /login on failure.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
hsiegeln
2026-03-13 17:39:29 +01:00
parent 3f98467ba5
commit 4253751ef1
2 changed files with 7 additions and 1 deletions

View File

@@ -23,7 +23,7 @@ const authMiddleware: Middleware = {
return request;
},
async onResponse({ response }) {
if (response.status === 401) {
if (response.status === 401 || response.status === 403) {
onUnauthorized();
}
return response;