summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--web/react/utils/client.jsx3
-rw-r--r--web/templates/head.html2
2 files changed, 4 insertions, 1 deletions
diff --git a/web/react/utils/client.jsx b/web/react/utils/client.jsx
index 1c417153b..8a4cee589 100644
--- a/web/react/utils/client.jsx
+++ b/web/react/utils/client.jsx
@@ -246,6 +246,7 @@ export function loginByEmail(name, email, password, success, error) {
data: JSON.stringify({name, email, password}),
success: function onSuccess(data, textStatus, xhr) {
track('api', 'api_users_login_success', data.team_id, 'email', data.email);
+ sessionStorage.removeItem(data.id + '_last_error');
BrowserStore.signalLogin();
success(data, textStatus, xhr);
},
@@ -267,6 +268,8 @@ export function loginByLdap(teamName, id, password, success, error) {
data: JSON.stringify({teamName, id, password}),
success: function onSuccess(data, textStatus, xhr) {
track('api', 'api_users_loginLdap_success', data.team_id, 'id', id);
+ sessionStorage.removeItem(data.id + '_last_error');
+ BrowserStore.signalLogin();
success(data, textStatus, xhr);
},
error: function onError(xhr, status, err) {
diff --git a/web/templates/head.html b/web/templates/head.html
index c2c40098c..70c94e8ff 100644
--- a/web/templates/head.html
+++ b/web/templates/head.html
@@ -77,7 +77,7 @@
}
console.log('detected login from a different tab');
- window.location.href = '/';
+ window.location.href = '/' + window.mm_team.name;
}
});
});