metrics/middleware.js

10 lines
301 B
JavaScript
Raw Permalink Normal View History

2023-09-06 19:13:24 +00:00
import { createMiddlewareClient } from "@supabase/auth-helpers-nextjs";
import { NextResponse } from "next/server";
export async function middleware(req) {
const res = NextResponse.next();
const supabase = createMiddlewareClient({ req, res });
await supabase.auth.getSession();
return res;
}