@nibssplc/cams-sdk-react 1.0.0-rc.79 → 1.0.0-rc.80

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
@@ -499,10 +499,15 @@ function useCAMSMSALAuth(options) {
499
499
  mfaConfig: mfaConfig,
500
500
  userConfig: userConfig,
501
501
  });
502
+ setAccessToken(response.accessToken);
503
+ setIdToken(response.idToken);
504
+ Logger.info("MSAL User Auth is Completed");
502
505
  // Don't persist as authenticated until MFA is complete
503
- if (typeof window !== "undefined" && userConfig.isValid && userConfig.userInfo.email) {
504
- setAccessToken(response.accessToken);
505
- setIdToken(response.idToken);
506
+ if (userConfig.isValid && userConfig.userInfo.email) {
507
+ Logger.info("MSAL User Auth is Completed...", {
508
+ storageKey: storageKey,
509
+ email: userConfig.userInfo.email,
510
+ });
506
511
  localStorage.setItem(storageKey, JSON.stringify({
507
512
  isAuthenticated: false,
508
513
  requiresMFA: userConfig.userInfo.isMFAEnabled,