@nibssplc/cams-sdk-react 1.0.0-rc.78 → 1.0.0-rc.79
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +4 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +4 -3
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -500,7 +500,7 @@ function useCAMSMSALAuth(options) {
|
|
|
500
500
|
userConfig: userConfig,
|
|
501
501
|
});
|
|
502
502
|
// Don't persist as authenticated until MFA is complete
|
|
503
|
-
if (typeof window !== "undefined" && userConfig.isValid) {
|
|
503
|
+
if (typeof window !== "undefined" && userConfig.isValid && userConfig.userInfo.email) {
|
|
504
504
|
setAccessToken(response.accessToken);
|
|
505
505
|
setIdToken(response.idToken);
|
|
506
506
|
localStorage.setItem(storageKey, JSON.stringify({
|
|
@@ -514,7 +514,7 @@ function useCAMSMSALAuth(options) {
|
|
|
514
514
|
}
|
|
515
515
|
else {
|
|
516
516
|
camsError = new CAMSError(CAMSErrorType.API_VALIDATION_ERROR, "Login failed: " + userConfig.message);
|
|
517
|
-
toast.error("Login failed
|
|
517
|
+
toast.error("Login failed");
|
|
518
518
|
setError(camsError);
|
|
519
519
|
}
|
|
520
520
|
return [3 /*break*/, 5];
|
|
@@ -1869,9 +1869,10 @@ var MFAGate = function (_a) {
|
|
|
1869
1869
|
}, 50);
|
|
1870
1870
|
return function () { return clearTimeout(timer); };
|
|
1871
1871
|
}, [
|
|
1872
|
+
context.accessToken,
|
|
1872
1873
|
context.isLoading,
|
|
1873
1874
|
context.isAuthenticated,
|
|
1874
|
-
|
|
1875
|
+
context.requiresMFA,
|
|
1875
1876
|
requiresMFA,
|
|
1876
1877
|
context,
|
|
1877
1878
|
]);
|