summaryrefslogtreecommitdiffstats
path: root/webapp
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2017-01-06 18:21:16 -0500
committerHarrison Healey <harrisonmhealey@gmail.com>2017-01-06 18:21:16 -0500
commit10200811308c5b857572ed2f66cb510b797a301d (patch)
tree68555a056aa46c5df2003b674a22c15c180c47ed /webapp
parentba336dce6903b7bd14686667e2cd4f79afaaf767 (diff)
downloadchat-10200811308c5b857572ed2f66cb510b797a301d.tar.gz
chat-10200811308c5b857572ed2f66cb510b797a301d.tar.bz2
chat-10200811308c5b857572ed2f66cb510b797a301d.zip
Prevent reload on MFA page (#5005)
Diffstat (limited to 'webapp')
-rw-r--r--webapp/client/web_client.jsx9
1 files changed, 8 insertions, 1 deletions
diff --git a/webapp/client/web_client.jsx b/webapp/client/web_client.jsx
index 53e199e66..99f30da37 100644
--- a/webapp/client/web_client.jsx
+++ b/webapp/client/web_client.jsx
@@ -13,6 +13,11 @@ import request from 'superagent';
const HTTP_UNAUTHORIZED = 401;
+const mfaPaths = [
+ '/mfa/setup',
+ '/mfa/confirm'
+];
+
class WebClientClass extends Client {
constructor() {
super();
@@ -39,7 +44,9 @@ class WebClientClass extends Client {
handleError(err, res) {
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;
}