feat(03-01): protect /portal routes and update post-login redirect
- middleware.ts: add /portal/:path* to matcher array - auth.config.ts: add isPortalRoute check, redirect unauthenticated to /agent/login - auth.config.ts: change post-login redirect from /agent/dashboard to /portal/dashboard - agent dashboard page: replace stub with redirect to /portal/dashboard
This commit is contained in:
@@ -5,5 +5,5 @@ const { auth } = NextAuth(authConfig);
|
||||
export default auth;
|
||||
|
||||
export const config = {
|
||||
matcher: ["/agent/:path*"],
|
||||
matcher: ["/agent/:path*", "/portal/:path*"],
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user