- 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
10 lines
219 B
TypeScript
10 lines
219 B
TypeScript
import NextAuth from "next-auth";
|
|
import { authConfig } from "@/lib/auth.config";
|
|
|
|
const { auth } = NextAuth(authConfig);
|
|
export default auth;
|
|
|
|
export const config = {
|
|
matcher: ["/agent/:path*", "/portal/:path*"],
|
|
};
|