mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-06-05 21:04:28 +08:00
feat(api): logging signout route (#59055)
This commit is contained in:
parent
6af8c1005e
commit
0fc4ea6949
@ -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);
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user