@logto/browser
Advanced tools
Comparing version 1.0.0-beta.2 to 1.0.0-beta.3
@@ -28,7 +28,7 @@ var $2FOI4$logtoclient = require("@logto/client"); | ||
} | ||
getItem(key) { | ||
async getItem(key) { | ||
if (key === "signInSession") return sessionStorage.getItem(this.storageKey); | ||
return localStorage.getItem(`${this.storageKey}:${key}`); | ||
} | ||
setItem(key, value) { | ||
async setItem(key, value) { | ||
if (key === "signInSession") { | ||
@@ -40,3 +40,3 @@ sessionStorage.setItem(this.storageKey, value); | ||
} | ||
removeItem(key) { | ||
async removeItem(key) { | ||
if (key === "signInSession") { | ||
@@ -43,0 +43,0 @@ sessionStorage.removeItem(this.storageKey); |
@@ -10,7 +10,7 @@ import $ElS14$logtoclient, {createRequester as $ElS14$createRequester, LogtoError as $90df2ab0e44b5eba$re_export$LogtoError, OidcError as $90df2ab0e44b5eba$re_export$OidcError, Prompt as $90df2ab0e44b5eba$re_export$Prompt, LogtoRequestError as $90df2ab0e44b5eba$re_export$LogtoRequestError, LogtoClientError as $90df2ab0e44b5eba$re_export$LogtoClientError} from "@logto/client"; | ||
} | ||
getItem(key) { | ||
async getItem(key) { | ||
if (key === "signInSession") return sessionStorage.getItem(this.storageKey); | ||
return localStorage.getItem(`${this.storageKey}:${key}`); | ||
} | ||
setItem(key, value) { | ||
async setItem(key, value) { | ||
if (key === "signInSession") { | ||
@@ -22,3 +22,3 @@ sessionStorage.setItem(this.storageKey, value); | ||
} | ||
removeItem(key) { | ||
async removeItem(key) { | ||
if (key === "signInSession") { | ||
@@ -25,0 +25,0 @@ sessionStorage.removeItem(this.storageKey); |
{ | ||
"name": "@logto/browser", | ||
"version": "1.0.0-beta.2", | ||
"version": "1.0.0-beta.3", | ||
"source": "./src/index.ts", | ||
@@ -32,3 +32,3 @@ "main": "./lib/index.js", | ||
"dependencies": { | ||
"@logto/client": "^1.0.0-beta.2", | ||
"@logto/client": "^1.0.0-beta.3", | ||
"@silverhand/essentials": "^1.1.6", | ||
@@ -64,3 +64,3 @@ "js-base64": "^3.7.2" | ||
}, | ||
"gitHead": "212891497b04e3a5fd6b24bbbeec227dfec8ae53" | ||
"gitHead": "e227f9b92f76ea7e12c2aac3d5e5b24f2b85e7e8" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
26019
1
Updated@logto/client@^1.0.0-beta.3