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