Merge branch '16947-session-validate' refs #16947
[arvados-workbench2.git] / src / store / auth / auth-action-session.ts
index fc35ff88056db1feac4ea319993b7c606a4a3631..8fc178101f2fc7d4885cfb281748cc102e763385 100644 (file)
@@ -44,7 +44,7 @@ const getClusterConfig = async (origin: string): Promise<Config | null> => {
     // Try the new public config endpoint
     try {
         const config = (await Axios.get<ClusterConfigJSON>(`${origin}/${CLUSTER_CONFIG_PATH}`)).data;
-        return {...buildConfig(config), apiRevision: configFromDD ? configFromDD.apiRevision : 0};
+        return { ...buildConfig(config), apiRevision: configFromDD ? configFromDD.apiRevision : 0 };
     } catch { }
 
     // Fall back to discovery document
@@ -114,7 +114,7 @@ export const validateCluster = async (config: Config, useToken: string):
     const svc = createServices(config, { progressFn: () => { }, errorFn: () => { } });
     setAuthorizationHeader(svc, saltedToken);
 
-    const user = await svc.authService.getUserDetails();
+    const user = await svc.authService.getUserDetails(false);
     return {
         user,
         token: saltedToken,
@@ -188,10 +188,11 @@ export const validateSessions = () =>
                           places in Workbench2. */
                         await dispatch(validateSession(session, activeSession));
                     } catch (e) {
-                        dispatch(snackbarActions.OPEN_SNACKBAR({
-                            message: e.message,
-                            kind: SnackbarKind.ERROR
-                        }));
+                        // Don't do anything here.  User may get
+                        // spammed with multiple messages that are not
+                        // helpful.  They can see the individual
+                        // errors by going to site manager and trying
+                        // to toggle the session.
                     }
                 }
             }