fix: robust logout session clearing with cookie cleanup and isLoggingOut guard
- Clear next-auth session cookies directly as backup in logout page - Add isLoggingOut localStorage flag to prevent TokenSync/PresenceProvider from restoring tokens - Clear isLoggingOut flag on login page load as safety net - Add createdAt to AgentSubscription interface (fixes build error) - Add /education to public routes in middleware
This commit is contained in:
@@ -280,6 +280,9 @@ export function CommonHeader() {
|
||||
<button
|
||||
onClick={() => {
|
||||
setShowProfileMenu(false);
|
||||
// Set logout flag FIRST so TokenSync and PresenceProvider
|
||||
// don't restore tokens during the logout navigation
|
||||
localStorage.setItem('isLoggingOut', 'true');
|
||||
localStorage.removeItem('accessToken');
|
||||
localStorage.removeItem('refreshToken');
|
||||
localStorage.removeItem('user');
|
||||
|
||||
Reference in New Issue
Block a user