Prevent reload on MFA page (#5005)
Этот коммит содержится в:
коммит произвёл
Harrison Healey
родитель
ba336dce69
Коммит
1020081130
@@ -13,6 +13,11 @@ import request from 'superagent';
|
|||||||
|
|
||||||
const HTTP_UNAUTHORIZED = 401;
|
const HTTP_UNAUTHORIZED = 401;
|
||||||
|
|
||||||
|
const mfaPaths = [
|
||||||
|
'/mfa/setup',
|
||||||
|
'/mfa/confirm'
|
||||||
|
];
|
||||||
|
|
||||||
class WebClientClass extends Client {
|
class WebClientClass extends Client {
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
@@ -39,7 +44,9 @@ class WebClientClass extends Client {
|
|||||||
|
|
||||||
handleError(err, res) {
|
handleError(err, res) {
|
||||||
if (res && res.body && res.body.id === 'api.context.mfa_required.app_error') {
|
if (res && res.body && res.body.id === 'api.context.mfa_required.app_error') {
|
||||||
window.location.reload();
|
if (mfaPaths.indexOf(window.location.pathname) === -1) {
|
||||||
|
window.location.reload();
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user