fix: Prevent token race conditions by pre-saving access/refresh tokens to localStorage before NextAuth signIn and refining logout token clearing.

This commit is contained in:
pradeepkumar committed 2026-03-16 13:25:32 +05:30
1 parent 63ad223c4c
commit 1e9262edfa
4 files changed
+26 -9

No files matched your search

+2 -5
View File
@@ -23,11 +23,8 @@ export default function LogoutPage() {
// Delete httpOnly cookies via server action (Next.js cookies() API)
await clearAuthCookies();
setTimeout(() => {
// Redirect to login
window.location.reload();
window.location.href = '/login';
}, 3000);
// Redirect to login immediately
window.location.href = '/login';
};
performLogout().catch(() => {