@nibssplc/cams-sdk-react 0.0.1-beta.39 → 0.0.1-beta.41
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 +3 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +3 -3
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -17338,7 +17338,7 @@ function ProtectedRoute(_a) {
|
|
|
17338
17338
|
var CAMSMSALContext = React__default.createContext(null);
|
|
17339
17339
|
var setCookie = function (name, value, days) {
|
|
17340
17340
|
var expires = new Date(Date.now() + days * 864e5).toUTCString();
|
|
17341
|
-
document.cookie = "".concat(name, "=").concat(encodeURIComponent(value), "; expires=").concat(expires, "; path=/; samesite=
|
|
17341
|
+
document.cookie = "".concat(name, "=").concat(encodeURIComponent(value), "; expires=").concat(expires, "; path=/; samesite=Lax");
|
|
17342
17342
|
};
|
|
17343
17343
|
var getCookie = function (name) {
|
|
17344
17344
|
var _a;
|
|
@@ -17367,12 +17367,13 @@ function CAMSMSALProviderInner(_a) {
|
|
|
17367
17367
|
var _this = this;
|
|
17368
17368
|
var children = _a.children, authOptions = __rest(_a, ["children"]);
|
|
17369
17369
|
var auth = useCAMSMSALAuth(authOptions);
|
|
17370
|
+
var profileStorageKey = "".concat(auth.storageKey, "-PROFILE");
|
|
17370
17371
|
var getInitialProfile = function () {
|
|
17371
17372
|
if (typeof window === "undefined") {
|
|
17372
17373
|
return null;
|
|
17373
17374
|
}
|
|
17374
17375
|
try {
|
|
17375
|
-
var storedProfile =
|
|
17376
|
+
var storedProfile = getCookie(profileStorageKey);
|
|
17376
17377
|
return storedProfile ? JSON.parse(storedProfile) : null;
|
|
17377
17378
|
}
|
|
17378
17379
|
catch (_a) {
|
|
@@ -17380,7 +17381,6 @@ function CAMSMSALProviderInner(_a) {
|
|
|
17380
17381
|
}
|
|
17381
17382
|
};
|
|
17382
17383
|
var _b = React__default.useState(getInitialProfile), userProfile = _b[0], setUserProfile = _b[1];
|
|
17383
|
-
var profileStorageKey = "".concat(auth.storageKey, "-PROFILE");
|
|
17384
17384
|
// Load profile from storage on mount
|
|
17385
17385
|
React__default.useEffect(function () {
|
|
17386
17386
|
if (typeof window !== "undefined") {
|