mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2025-12-30 03:03:06 -05:00
feat(api): logging signout route (#59055)
This commit is contained in:
@@ -16,8 +16,10 @@ export const signoutRoute: FastifyPluginCallback = (
|
||||
done
|
||||
) => {
|
||||
fastify.get('/signout', async (req, reply) => {
|
||||
void reply.clearOurCookies();
|
||||
const logger = fastify.log.child({ req });
|
||||
|
||||
void reply.clearOurCookies();
|
||||
logger.info('User signed out');
|
||||
const { returnTo } = getRedirectParams(req);
|
||||
await reply.redirect(returnTo);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user