This repository has been archived on 2026-01-31. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
nextjs-auth0/middleware.ts
2024-07-08 11:49:46 +02:00

15 lines
365 B
TypeScript

import { withMiddlewareAuthRequired } from '@auth0/nextjs-auth0/edge';
import { NextResponse } from 'next/server';
export default withMiddlewareAuthRequired({
async middleware() {
const res = NextResponse.next();
return res;
},
returnTo: '/api/auth/login'
});
export const config = {
matcher: ['/api/protected/:path*', '/customer-form/:path*']
};