refactor(auth): streamline logout route and update route tree for logout integration
This commit is contained in:
@@ -108,8 +108,15 @@ pnpm --filter web dev # :5173
|
||||
| 403 на write | Только `*:read` в permissions |
|
||||
| Loop на login | `return_to` не в `RETURN_TO_ALLOWLIST` |
|
||||
| Infinite SSO / 429 | Просроченный JWT в portal localStorage; или разный `JWT_SECRET`/`ISSUER`. Portal чистит expired token; VPS блокирует повторный handoff 12с |
|
||||
| «Выйти» сразу возвращает в приложение | Старый клиент редиректил на `/?return_to=…` при живой portal-сессии. Нужен редирект на **`/logout`** (см. ниже) |
|
||||
| CORS | Portal и VPS на разных origin — fragment handoff не требует CORS для token |
|
||||
|
||||
## Logout (SSO)
|
||||
|
||||
«Выйти» в приложении: очистить локальный JWT → `AUTH_PORTAL_URL/logout` (без `return_to`).
|
||||
|
||||
Портал на `/logout`: `POST /api/v1/auth/logout` (revoke refresh cookie) → `clearToken()` → форма логина.
|
||||
|
||||
## Production
|
||||
|
||||
- Один `JWT_SECRET` в secret store обоих сервисов
|
||||
|
||||
Reference in New Issue
Block a user