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:
@@ -5,7 +5,7 @@ import { NextResponse } from "next/server";
|
||||
const authRoutes = ["/login", "/signup", "/forgot-password", "/reset-password", "/verify-email"];
|
||||
|
||||
// Public routes - accessible to everyone (logged in or not)
|
||||
const publicRoutes = ["/", "/contact", "/about", "/faq", "/logout", "/user/dashboard", "/user/profiles", "/user/profile"];
|
||||
const publicRoutes = ["/", "/contact", "/about", "/faq", "/education", "/logout", "/user/dashboard", "/user/profiles", "/user/profile"];
|
||||
|
||||
export default auth((req) => {
|
||||
const { nextUrl } = req;
|
||||
|
||||
Reference in New Issue
Block a user