@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 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
- return userIdentityFromJwt(searchParams.get("jwt"));
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
- return userIdentityFromJwt(searchParams.get("jwt"));
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)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saasquatch/component-environment",
3
- "version": "1.0.10",
3
+ "version": "1.0.11-0",
4
4
  "description": "Environment and contexts for SaaSquatch components",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",