15064: If initializing auth fails, go back to login screen.
authorPeter Amstutz <pamstutz@veritasgenetics.com>
Mon, 13 May 2019 18:37:33 +0000 (14:37 -0400)
committerPeter Amstutz <pamstutz@veritasgenetics.com>
Mon, 13 May 2019 18:37:33 +0000 (14:37 -0400)
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz@veritasgenetics.com>

src/store/auth/auth-action.ts

index 1605e302f908e98fd1dde759a5d1965c4c702f0a..9d76e499ea674e7a060e69f1f65401f65133f57f 100644 (file)
@@ -58,6 +58,8 @@ export const initAuth = (config: Config) => (dispatch: Dispatch, getState: () =>
         dispatch<any>(initSessions(services.authService, config, user));
         dispatch<any>(getUserDetails()).then((user: User) => {
             dispatch(authActions.INIT({ user, token }));
         dispatch<any>(initSessions(services.authService, config, user));
         dispatch<any>(getUserDetails()).then((user: User) => {
             dispatch(authActions.INIT({ user, token }));
+        }).catch(() => {
+            logout()(dispatch, getState, services);
         });
     }
     Object.keys(config.remoteHosts).map((k) => {
         });
     }
     Object.keys(config.remoteHosts).map((k) => {