@saasquatch/component-environment 1.0.10 → 1.0.11-0
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.js +3 -1
- package/dist/index.mjs +3 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -555,7 +555,9 @@ function _getInitialValue() {
|
|
|
555
555
|
case "SquatchPortal":
|
|
556
556
|
const searchParams = new URLSearchParams(document.location.search);
|
|
557
557
|
if (searchParams.has("jwt")) {
|
|
558
|
-
|
|
558
|
+
const identity = userIdentityFromJwt(searchParams.get("jwt"));
|
|
559
|
+
localStorage.setItem(USER_CONTEXT_NAME, JSON.stringify(identity));
|
|
560
|
+
return identity;
|
|
559
561
|
}
|
|
560
562
|
const stored = localStorage.getItem(USER_CONTEXT_NAME);
|
|
561
563
|
if (!stored)
|
package/dist/index.mjs
CHANGED
|
@@ -506,7 +506,9 @@ function _getInitialValue() {
|
|
|
506
506
|
case "SquatchPortal":
|
|
507
507
|
const searchParams = new URLSearchParams(document.location.search);
|
|
508
508
|
if (searchParams.has("jwt")) {
|
|
509
|
-
|
|
509
|
+
const identity = userIdentityFromJwt(searchParams.get("jwt"));
|
|
510
|
+
localStorage.setItem(USER_CONTEXT_NAME, JSON.stringify(identity));
|
|
511
|
+
return identity;
|
|
510
512
|
}
|
|
511
513
|
const stored = localStorage.getItem(USER_CONTEXT_NAME);
|
|
512
514
|
if (!stored)
|