mirror of https://github.com/waku-org/metrics.git
10 lines
301 B
JavaScript
10 lines
301 B
JavaScript
|
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;
|
||
|
}
|