Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
let authProvider = JSON.parse(localStorage.getItem("authProvider"));
console.log(authProvider);
if (authProvider === "uPort") {
await localStorage.removeItem("authProvider");
await localStorage.removeItem("uPortUser");
await localStorage.removeItem("profileFound");
await localStorage.removeItem("oauthData");
await localStorage.removeItem("storageProvider");
await localStorage.removeItem("graphite_keys");
window.location.replace("/");
} else {
if (isUserSignedIn()) {
//Handle Blockstack sign out
await localStorage.removeItem("authProvider");
await localStorage.removeItem("blockstackUser");
signUserOut(window.location.origin);
}
}
}
_handleSignOut(e) {
e.preventDefault();
signUserOut(window.location.origin + "?blockstack");
}
handleSignOut(e) {
e.preventDefault();
signUserOut(window.location.origin);
}
handleSignOut(e) {
e.preventDefault();
signUserOut(window.location.origin);
}
handleSignOut(e) {
e.preventDefault();
signUserOut(window.location.origin);
}
<button> signUserOut(window.location.origin)}>
Sign out</button>
handleSignOut(e) {
e.preventDefault();
signUserOut(window.location.origin);
}
handleSignOut(e) {
e.preventDefault();
signUserOut(window.location.origin);
}
handleSignOut(e) {
e.preventDefault();
signUserOut(window.location.origin);
}
handleSignOut(e) {
e.preventDefault();
signUserOut(window.location.origin);
}