mirror of
https://github.com/r-freeman/portfolio.git
synced 2024-11-15 05:55:41 +00:00
11 lines
417 B
TypeScript
11 lines
417 B
TypeScript
|
import {createMiddlewareClient} from '@supabase/auth-helpers-nextjs'
|
||
|
import type {NextRequest} from 'next/server'
|
||
|
import {NextResponse} from 'next/server'
|
||
|
import type {Database} from '@/types/database.types'
|
||
|
|
||
|
export async function middleware(req: NextRequest) {
|
||
|
const res = NextResponse.next()
|
||
|
const supabase = createMiddlewareClient<Database>({req, res})
|
||
|
await supabase.auth.getSession()
|
||
|
return res
|
||
|
}
|