mirror of
https://github.com/StanGirard/quivr.git
synced 2024-12-18 16:11:45 +03:00
12 lines
427 B
TypeScript
12 lines
427 B
TypeScript
|
import { createMiddlewareSupabaseClient } from '@supabase/auth-helpers-nextjs'
|
||
|
import { NextResponse } from 'next/server'
|
||
|
|
||
|
import type { NextRequest } from 'next/server'
|
||
|
// import type { Database } from '@/lib/database.types'
|
||
|
|
||
|
export async function middleware(req: NextRequest) {
|
||
|
const res = NextResponse.next()
|
||
|
const supabase = createMiddlewareSupabaseClient({ req, res })
|
||
|
await supabase.auth.getSession()
|
||
|
return res
|
||
|
}
|