Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

Commit

Permalink
Prevent reload on MFA page (#5005)
Browse files Browse the repository at this point in the history
  • Loading branch information
jwilander authored and hmhealey committed Jan 6, 2017
1 parent b2ecce0 commit 3a16f6e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion client/web_client.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ import request from 'superagent';

const HTTP_UNAUTHORIZED = 401;

const mfaPaths = [
'/mfa/setup',
'/mfa/confirm'
];

class WebClientClass extends Client {
constructor() {
super();
Expand All @@ -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;
}

Expand Down

0 comments on commit 3a16f6e

Please sign in to comment.