projects
/
arvados-workbench2.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
16029: Fixes failed login attempt by redirecting the user to the login page.
[arvados-workbench2.git]
/
src
/
store
/
auth
/
auth-action.ts
diff --git
a/src/store/auth/auth-action.ts
b/src/store/auth/auth-action.ts
index 1d8a01c6f61ef1ee6562012cc184d17a0ea732eb..923d3c9ea693427c344fda6f5344758af153c83b 100644
(file)
--- a/
src/store/auth/auth-action.ts
+++ b/
src/store/auth/auth-action.ts
@@
-78,6
+78,8
@@
export const saveApiToken = (token: string) => (dispatch: Dispatch, getState: ()
setAuthorizationHeader(svc, token);
return svc.authService.getUserDetails().then((user: User) => {
dispatch(authActions.INIT_USER({ user, token }));
+ }).catch(() => {
+ dispatch(authActions.LOGOUT({ deleteLinkData: false }));
});
};