Problem
Users cannot log out from anywhere except the profile page. Verified: signOut is called from exactly one file in the codebase — src/pages/profile/[id].tsx:65.
The header (src/layouts/headers/header.tsx, header-01.tsx, header-02.tsx) contains no useSession usage and no logout affordance. A logged-in user on any non-profile page has no way to sign out without knowing to navigate to /profile/{their-id}.
Expected behavior
- Header shows an auth-aware user menu when signed in (avatar + dropdown).
- Dropdown includes: link to profile, link to settings, and a Logout button.
- Header shows a "Sign in" link when signed out.
- Works on all three header variants.
Acceptance criteria
Suggested approach
- Create
src/components/header/user-menu.tsx that uses useSession() with a status === "loading" skeleton state.
- Import it into each header variant.
- Reuse the hardened logout handler pattern (
signOut({ callbackUrl: "/login" }) with try/catch + alert on error).
Related
- Surfaced in the end-to-end user flow audit (2026-04-17).
Problem
Users cannot log out from anywhere except the profile page. Verified:
signOutis called from exactly one file in the codebase —src/pages/profile/[id].tsx:65.The header (
src/layouts/headers/header.tsx,header-01.tsx,header-02.tsx) contains nouseSessionusage and no logout affordance. A logged-in user on any non-profile page has no way to sign out without knowing to navigate to/profile/{their-id}.Expected behavior
Acceptance criteria
/,/about-us, etc.).security/auth-hardeningbranch for the pattern).Suggested approach
src/components/header/user-menu.tsxthat usesuseSession()with astatus === "loading"skeleton state.signOut({ callbackUrl: "/login" })with try/catch + alert on error).Related