mirror of
https://github.com/SkalaraAI/skbeta.git
synced 2025-04-04 04:20:21 -04:00
13 lines
423 B
TypeScript
13 lines
423 B
TypeScript
import { createMiddlewareClient } from "@supabase/auth-helpers-nextjs";
|
|
import { NextResponse } from "next/server";
|
|
|
|
import type { NextRequest } from "next/server";
|
|
import type { Database } from "@/types/supabase";
|
|
|
|
export async function middleware(req: NextRequest) {
|
|
const res = NextResponse.next();
|
|
const supabase = createMiddlewareClient<Database>({ req, res });
|
|
await supabase.auth.getSession();
|
|
return res;
|
|
}
|