Skip to content

Commit

Permalink
Delete cookie after log out
Browse files Browse the repository at this point in the history
  • Loading branch information
kloV148 authored and Ivan committed Jun 30, 2024
1 parent 4979192 commit 49c2a8b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/presentation/http/router/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,10 @@ const AuthRouter: FastifyPluginCallback<AuthRouterOptions> = (fastify, opts, don
await opts.authService.removeSessionByRefreshToken(request.body.token);

return reply
.clearCookie('refreshToken', {
path: '/auth',
domain: opts.cookieDomain,
})
.status(StatusCodes.OK)
.send({
ok: true,
Expand Down

0 comments on commit 49c2a8b

Please sign in to comment.