Unverified Commit 64ca30f8 authored by Diego Mello's avatar Diego Mello Committed by GitHub
Browse files

[FIX] Change force logout rule (#1640)

parent 7f9a2970
......@@ -36,11 +36,11 @@ const handleLoginRequest = function* handleLoginRequest({ credentials, logoutOnE
result = yield call(loginWithPasswordCall, credentials);
}
return yield put(loginSuccess(result));
} catch (error) {
if (logoutOnError) {
} catch (e) {
if (logoutOnError && (e.data && e.data.message && /you've been logged out by the server/i.test(e.data.message))) {
yield put(logout());
} else {
yield put(loginFailure(error));
yield put(loginFailure(e));
}
}
};
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment