fix: #8943, session mismatch modal thrown on login (race condition)

This commit is contained in:
Julian Lam
2020-11-25 15:45:03 -05:00
parent ac734b8335
commit d584516947
2 changed files with 4 additions and 1 deletions

View File

@@ -194,7 +194,7 @@ app.cacheBuster = null;
};
app.handleInvalidSession = function () {
if (app.flags._logout) {
if (app.flags._login || app.flags._logout) {
return;
}

View File

@@ -29,6 +29,9 @@ define('forum/login', ['jquery-form'], function () {
headers: {
'x-csrf-token': config.csrf_token,
},
beforeSend: function () {
app.flags._login = true;
},
success: function (data) {
$(window).trigger('action:app.loggedIn', data);
var pathname = utils.urlToLocation(data.next).pathname;