From 951ae8c570f1197b6de5aba54abe078df70b8336 Mon Sep 17 00:00:00 2001 From: chyoo Date: Mon, 6 Jul 2026 09:53:06 +0900 Subject: [PATCH] forward bearer token on launcher logout --- src/auth/auth.controller.ts | 6 +++++- src/auth/auth.service.ts | 7 ++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/auth/auth.controller.ts b/src/auth/auth.controller.ts index bb2132a..e419d23 100644 --- a/src/auth/auth.controller.ts +++ b/src/auth/auth.controller.ts @@ -37,7 +37,11 @@ export class AuthController { @Req() request: Request, @Res({ passthrough: true }) response: Response, ) { - return this.authService.logout(request.headers.cookie, response); + return this.authService.logout( + request.headers.cookie, + response, + this.getBearerToken(request), + ); } @Get('me') diff --git a/src/auth/auth.service.ts b/src/auth/auth.service.ts index d65b93c..6604372 100644 --- a/src/auth/auth.service.ts +++ b/src/auth/auth.service.ts @@ -63,10 +63,15 @@ export class AuthService { return this.frontendTokenResponse(authResponse); } - async logout(cookieHeader: string | undefined, response: Response) { + async logout( + cookieHeader: string | undefined, + response: Response, + accessToken?: string, + ) { await this.request('/auth/logout', { method: 'POST', cookieHeader, + accessToken, response, ignoreAuthErrors: true, });