Skip to content

fix: logout when auth token expires#237

Open
momocentral wants to merge 1 commit into
mainfrom
fix/11-logout-expired-token
Open

fix: logout when auth token expires#237
momocentral wants to merge 1 commit into
mainfrom
fix/11-logout-expired-token

Conversation

@momocentral

@momocentral momocentral commented May 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Clear stored auth state and remove the Authorization header when an authenticated API request returns an expired/invalid token response
  • Redirect users through the existing protected-route flow and show a session-expired warning on the login page
  • Add localized session-expired copy and a regression test for auth-error logout

Fixes #11

Local checks

  • pnpm test src/context/AuthProvider.test.tsx -- --runInBand
  • pnpm exec eslint src/context/AuthProvider.test.tsx src/context/AuthContext.tsx src/context/AuthProvider.tsx src/components/Login/LoginForm.tsx --no-warn-ignored
  • pnpm build
Screenshot 2026-05-23 at 8 11 01 PM Screenshot 2026-05-23 at 9 27 53 PM

@vercel

vercel Bot commented May 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
new-pyro-platform Ready Ready Preview, Comment May 23, 2026 1:30pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

As a user, when my token expire, i want to be notified

2 participants