@flow-industries/id 0.8.0 → 0.8.1

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.
@@ -10,6 +10,11 @@ export function makeRefreshStore(host) {
10
10
  }
11
11
  },
12
12
  set(token) {
13
+ // Never persist a missing token: localStorage.setItem coerces undefined
14
+ // to the literal "undefined", which later reads back as a bogus bearer
15
+ // and 401s as refresh_token_invalid. Fail safe by ignoring it instead.
16
+ if (!token)
17
+ return;
13
18
  try {
14
19
  localStorage.setItem(key, token);
15
20
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flow-industries/id",
3
- "version": "0.8.0",
3
+ "version": "0.8.1",
4
4
  "main": "./dist/sdk/client/index.js",
5
5
  "module": "./dist/sdk/client/index.js",
6
6
  "types": "./dist/sdk/client/index.d.ts",