Set document title on navigation to url path, refs #19369
[arvados-workbench2.git] / src / store / auth / auth-middleware.ts
index 87a1253b8052840393a5abef4b3bcf66b668d0a7..0d08405ae11e87f329553e236e4550c0720a6fd6 100644 (file)
@@ -56,10 +56,10 @@ export const authMiddleware = (services: ServiceRepository): Middleware => store
             }
         },
         SET_CONFIG: ({ config }) => {
-            document.title = `Arvados Workbench (${config.uuidPrefix})`;
+            document.title = `Arvados (${config.uuidPrefix})`;
             next(action);
         },
-        LOGOUT: ({ deleteLinkData }) => {
+        LOGOUT: ({ deleteLinkData, preservePath }) => {
             next(action);
             if (deleteLinkData) {
                 services.linkAccountService.removeAccountToLink();
@@ -69,7 +69,7 @@ export const authMiddleware = (services: ServiceRepository): Middleware => store
             services.authService.removeSessions();
             services.authService.removeUser();
             removeAuthorizationHeader(services);
-            services.authService.logout(token || '');
+            services.authService.logout(token || '', preservePath);
         },
         default: () => next(action)
     });