Skip to content

Commit

Permalink
fix: clearCookie부분에 쿠키 옵션이 지정되어 있지 않던 문제 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
blaxsior committed Dec 8, 2023
1 parent e2cb363 commit 3b9fb2d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion backend/server/src/auth/auth.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,11 @@ export class AuthController {
return await this.authService.refresh(refresh_token);
} catch (e) {
// 토큰이 유효하지 않은 경우 -> 토큰을 삭제하고 에러 메시지 반환
res.clearCookie(REFRESH_TOKEN_NAME);
res.clearCookie(REFRESH_TOKEN_NAME, {
httpOnly: true,
sameSite: 'none',
secure: true,
});
throw e;
}
}
Expand Down

0 comments on commit 3b9fb2d

Please sign in to comment.