mirror of
https://github.com/ershisan99/flashcards-api.git
synced 2025-12-16 20:59:26 +00:00
fix cookie reset on logout
This commit is contained in:
@@ -160,8 +160,8 @@ export class AuthController {
|
||||
): Promise<void> {
|
||||
if (!accessToken) throw new UnauthorizedException()
|
||||
await this.commandBus.execute(new LogoutCommand(accessToken))
|
||||
res.clearCookie('accessToken')
|
||||
res.clearCookie('refreshToken')
|
||||
res.clearCookie('accessToken', { httpOnly: true, sameSite: 'none', secure: true })
|
||||
res.clearCookie('refreshToken', { httpOnly: true, sameSite: 'none', secure: true })
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user