mirror of
https://github.com/SkalaraAI/skalara-web.git
synced 2025-04-05 04:50:19 -04:00
15 lines
366 B
TypeScript
15 lines
366 B
TypeScript
import { createMiddlewareClient } from "@supabase/auth-helpers-nextjs";
|
|
import { NextResponse } from "next/server";
|
|
|
|
import type { NextRequest } from "next/server";
|
|
|
|
export async function middleware(req: NextRequest) {
|
|
const res = NextResponse.next();
|
|
|
|
const supabase = createMiddlewareClient({ req, res });
|
|
|
|
await supabase.auth.getSession();
|
|
|
|
return res;
|
|
}
|