Files
supanextail/pages/api/auth.ts
2021-08-24 11:57:13 +02:00

13 lines
418 B
TypeScript

/**
* NOTE: this file is only needed if you're doing SSR (getServerSideProps)!
* With SupaNexTail, we use SSR with the Dashboard page (pages/dashboard.js)
*/
import type { NextApiRequest, NextApiResponse } from 'next';
import { supabase } from 'utils/supabaseClient';
export default async function handler(req: NextApiRequest, res: NextApiResponse): Promise<void> {
supabase.auth.api.setAuthCookie(req, res);
}