@nibssplc/cams-sdk-react 1.0.0-rc.17 → 1.0.0-rc.18
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.esm.js
CHANGED
|
@@ -541,7 +541,7 @@ function useCAMSMSALAuth(options) {
|
|
|
541
541
|
case 4: return [2 /*return*/];
|
|
542
542
|
}
|
|
543
543
|
});
|
|
544
|
-
}); }, [instance, scopes, options, inProgress]);
|
|
544
|
+
}); }, [instance, scopes, options.prompt, options.appCode, options.MFAEndpoint, options.onAuthSuccess, options.onAuthError, storageKey, inProgress]);
|
|
545
545
|
var completeMFA = useCallback(function (data) { return __awaiter$1(_this, void 0, void 0, function () {
|
|
546
546
|
return __generator$1(this, function (_a) {
|
|
547
547
|
if (!mfaAuthenticator) {
|
|
@@ -576,7 +576,7 @@ function useCAMSMSALAuth(options) {
|
|
|
576
576
|
}
|
|
577
577
|
return [2 /*return*/];
|
|
578
578
|
});
|
|
579
|
-
}); }, [mfaAuthenticator, accessToken, idToken, storageKey]);
|
|
579
|
+
}); }, [mfaAuthenticator, accessToken, idToken, storageKey, options.activeCookiePeriod]);
|
|
580
580
|
var sendEmailOTP = useCallback(function () { return __awaiter$1(_this, void 0, void 0, function () {
|
|
581
581
|
return __generator$1(this, function (_a) {
|
|
582
582
|
switch (_a.label) {
|
|
@@ -633,6 +633,7 @@ function useCAMSMSALAuth(options) {
|
|
|
633
633
|
completeMFA: completeMFA,
|
|
634
634
|
sendEmailOTP: sendEmailOTP,
|
|
635
635
|
setRequiresMFA: setRequiresMFA,
|
|
636
|
+
activeCookiePeriod: options.activeCookiePeriod || 1,
|
|
636
637
|
};
|
|
637
638
|
}
|
|
638
639
|
|
|
@@ -1301,7 +1302,7 @@ function CAMSMSALProviderInner(_a) {
|
|
|
1301
1302
|
useEffect(function () {
|
|
1302
1303
|
if (typeof window !== "undefined") {
|
|
1303
1304
|
if (userProfile) {
|
|
1304
|
-
setCookie(profileStorageKey, JSON.stringify(userProfile),
|
|
1305
|
+
setCookie(profileStorageKey, JSON.stringify(userProfile), auth.activeCookiePeriod); // Store for 1 day
|
|
1305
1306
|
}
|
|
1306
1307
|
else {
|
|
1307
1308
|
deleteCookie(profileStorageKey);
|