feat(tradein/ui): login-форма + session-aware RouteGuard (#2555) #2562
No reviewers
Labels
No labels
admin
analytics
auth
automation
bug
business
chore
ci
compliance
data
data-moat
docs
duplicate
dx
enhancement
Fable 5 ревью
feedback/max
generative
GG-форсайт
needs-discussion
needs-human
observability
pause-bots
performance
priority/p0
priority/p1
priority/p2
priority/p3
scope/backend
scope/db
scope/devops
scope/frontend
scope/qa
scrapers
security
site-finder
stage/1
stage/2
status/blocked
status/done
status/needs-analysis
status/needs-fix
status/qa
status/ready
status/review
status/wip
tech-debt
tradein
ux
week ревью 1
wontfix
вторичка
ИРД
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lekss361/gendesign#2562
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "feat/tradein-login-ui"
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?
Closes #2555 (эпик #2549, шаг 5/8).
app/login/page.tsx— форма username+password, русские ошибки (401 / 429 / сеть),sanitizeNext()против open-redirect (только одиночный/, отбрасывает//hostи/\host)components/auth/RouteGuard.tsx— 401 →/login?next=<путь>; ранний bypass для/login(как у/ui-preview) против редирект-петли; веткаexpired(trial-экран) и dev-режим не тронутыlib/useMe.ts—Roleрасширена доadmin|manager|employee|pilot|analyst|expiredlib/useLogout.ts(новый) + TopNav v2 переключён на session-logoutnext=строится из пути БЕЗ/trade-in(Next префиксит сам) — иначе задвоение префиксаsame-origincredentials уже шлётtradein_session— правок вapi.tsне потребовалосьtsc --noEmit+ lint +npm run buildчисто (/login— static route, 4.57 kB). Legacy UserMenu на остальных страницах намеренно оставлен на basic_auth-логауте (вне scope). Визуал — проверка на проде после мержа (RouteGuard без бекенда рендерит null).