X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/2a15974a93e2fce120e27a07953464764e930c22..07086d1ce2f74956fd3a498f184fcc0274f3e38d:/src/store/auth/auth-middleware.ts diff --git a/src/store/auth/auth-middleware.ts b/src/store/auth/auth-middleware.ts index 6eef5e5e16..ce7cd5cb6f 100644 --- a/src/store/auth/auth-middleware.ts +++ b/src/store/auth/auth-middleware.ts @@ -64,11 +64,12 @@ export const authMiddleware = (services: ServiceRepository): Middleware => store if (deleteLinkData) { services.linkAccountService.removeAccountToLink(); } + const token = services.authService.getApiToken(); services.authService.removeApiToken(); services.authService.removeSessions(); services.authService.removeUser(); removeAuthorizationHeader(services); - services.authService.logout(); + services.authService.logout(token || ''); }, default: () => next(action) });