diff --git a/src/middleware.ts b/src/middleware.ts index 117d5ff..70ee825 100644 --- a/src/middleware.ts +++ b/src/middleware.ts @@ -1,18 +1,3 @@ -import { NextRequest, NextResponse } from 'next/server'; - -export default async function middleware(req: NextRequest) { - const path = req.nextUrl.pathname; - const session = !!req.cookies.get("next-auth.session-token") - - if (!session) { - return NextResponse.redirect(new URL(`/api/auth/signin?callbackUrl=${path}`, req.url)); - } - return NextResponse.next(); -} +export { default } from "next-auth/middleware" export const config = { matcher: ["/dashboard", "/create-room", "/rooms/:path*", "/join"] } - -// export { default } from "next-auth/middleware" - -// export const config = { matcher: ["/dashboard", "/create-room", "/rooms/:path*", "/join"] } -