@nibssplc/cams-sdk-react 0.0.1-beta.70 → 0.0.1-beta.71
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 +6 -5
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +6 -5
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -280,7 +280,7 @@ function useCAMSMSALAuth(options) {
|
|
|
280
280
|
setMfaAuthenticator(authenticator);
|
|
281
281
|
setRequiresMFA(true);
|
|
282
282
|
}
|
|
283
|
-
|
|
283
|
+
Logger.debug("App Code", { ">>>": options.appCode });
|
|
284
284
|
}
|
|
285
285
|
else {
|
|
286
286
|
localStorage.removeItem(storageKey);
|
|
@@ -443,6 +443,7 @@ function useCAMSMSALAuth(options) {
|
|
|
443
443
|
switch (_a.label) {
|
|
444
444
|
case 0:
|
|
445
445
|
_a.trys.push([0, 2, , 3]);
|
|
446
|
+
Logger.info("Logging User Out");
|
|
446
447
|
return [4 /*yield*/, instance.logoutRedirect()];
|
|
447
448
|
case 1:
|
|
448
449
|
_a.sent();
|
|
@@ -1194,8 +1195,8 @@ function CAMSProviderCore(props) {
|
|
|
1194
1195
|
!auth.requiresMFA &&
|
|
1195
1196
|
auth.isAuthenticated &&
|
|
1196
1197
|
!userProfile) {
|
|
1197
|
-
// MFA completed, extract profile from
|
|
1198
|
-
var storedData =
|
|
1198
|
+
// MFA completed, extract profile from localStorage
|
|
1199
|
+
var storedData = localStorage.getItem(auth.storageKey);
|
|
1199
1200
|
if (storedData) {
|
|
1200
1201
|
try {
|
|
1201
1202
|
var parsed = JSON.parse(storedData);
|
|
@@ -1206,7 +1207,7 @@ function CAMSProviderCore(props) {
|
|
|
1206
1207
|
catch (_a) { }
|
|
1207
1208
|
}
|
|
1208
1209
|
}
|
|
1209
|
-
}, [mode, auth, userProfile]);
|
|
1210
|
+
}, [mode, auth, userProfile, auth.storageKey]);
|
|
1210
1211
|
var value = useMemo(function () {
|
|
1211
1212
|
return (__assign(__assign({}, auth), { logout: enhancedLogout, userProfile: userProfile, setUserProfile: setUserProfile, authMode: mode }));
|
|
1212
1213
|
}, [auth, userProfile, mode, mode === "MSAL" && "requiresMFA" in auth ? auth.requiresMFA : null]);
|
|
@@ -1847,7 +1848,7 @@ var MFAGate = function (_a) {
|
|
|
1847
1848
|
if (!urlValidation.success) {
|
|
1848
1849
|
throw new Error("Invalid MFAEndpoint: ".concat(urlValidation.error.issues[0].message));
|
|
1849
1850
|
}
|
|
1850
|
-
|
|
1851
|
+
Logger.debug("MFA Endpoint >>>", { MFAEndpoint: MFAEndpoint });
|
|
1851
1852
|
// Only apply MFA gate for MSAL mode
|
|
1852
1853
|
if (context.authMode !== "MSAL") {
|
|
1853
1854
|
return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: children });
|