Skip to content

Commit

Permalink
update: logout process
Browse files Browse the repository at this point in the history
  • Loading branch information
siwonpada committed Oct 3, 2024
1 parent 8d02d78 commit 63c32e2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/idp/idp.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@ export class IdpController {
@ApiResponse({ status: 204, description: '로그아웃 성공' })
@ApiInternalServerErrorResponse({ description: '서버 에러' })
@Delete('logout')
async logout(@Res({ passthrough: true }) response: Response): Promise<void> {
async logout(
@Req() request: Request,
@Res({ passthrough: true }) response: Response,
): Promise<void> {
await this.idpService.logout(request.cookies.refreshToken);
response.clearCookie('refreshToken');
}

Expand Down

0 comments on commit 63c32e2

Please sign in to comment.