Auth0 Initial Code

This commit is contained in:
2025-04-12 13:45:49 -04:00
parent 94c2d58a73
commit 81196071b4
10 changed files with 95 additions and 63 deletions

18
src/middleware.ts Normal file
View File

@@ -0,0 +1,18 @@
import type { NextRequest } from "next/server";
import { auth0 } from "./lib/auth0"
export async function middleware(request: NextRequest) {
return await auth0.middleware(request);
}
export const config = {
matcher: [
/*
* Match all request paths except for the ones starting with:
* - _next/static (static files)
* - _next/image (image optimization files)
* - favicon.ico, sitemap.xml, robots.txt (metadata files)
*/
"/((?!_next/static|_next/image|favicon.ico|sitemap.xml|robots.txt).*)",
],
};