Merge branch 'master' into 16812-token-appears-in-the-download-URL
[arvados.git] / src / store / auth / auth-middleware.ts
index 76f85984b06e0a5dc0a5c88696f8ce931eb0286d..6eef5e5e16a59cd74d826dc3c32a09b6215894c4 100644 (file)
@@ -30,6 +30,7 @@ export const authMiddleware = (services: ServiceRepository): Middleware => store
                 setAuthorizationHeader(services, state.auth.apiToken);
             } else {
                 services.authService.removeApiToken();
+                services.authService.removeSessions();
                 removeAuthorizationHeader(services);
             }
 
@@ -64,6 +65,7 @@ export const authMiddleware = (services: ServiceRepository): Middleware => store
                 services.linkAccountService.removeAccountToLink();
             }
             services.authService.removeApiToken();
+            services.authService.removeSessions();
             services.authService.removeUser();
             removeAuthorizationHeader(services);
             services.authService.logout();