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:
@@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user