-
-
Save vpaladino778/13754f5827f7628b3368a7015e402ae3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { NextApiRequest, NextApiResponse } from 'next'; | |
import { unsetAuthCookies } from 'next-firebase-auth'; | |
import initAuth from '../../service/auth/initAuth'; | |
initAuth(); | |
const handler = async (req: NextApiRequest, res: NextApiResponse<any>) => { | |
try { | |
await unsetAuthCookies(req, res); | |
} catch (e) { | |
return res.status(500).json({ error: 'Unexpected error.' }); | |
} | |
return res.status(200).json({ success: true }); | |
}; | |
export default handler; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment