Skip to content

Commit

Permalink
fixes logout
Browse files Browse the repository at this point in the history
  • Loading branch information
arch1995 committed Sep 30, 2024
1 parent b2a4c82 commit 8f863a8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Web3Auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,9 +261,10 @@ class Web3Auth implements IWeb3Auth {
if (!this.sessionManager.sessionId) {
throw LoginError.userNotLoggedIn();
}
const currentUserInfo = this.userInfo();

await this.sessionManager.invalidateSession();
await this.keyStore.remove("sessionId");
const currentUserInfo = this.userInfo();

if (currentUserInfo.verifier && currentUserInfo.dappShare.length > 0) {
await this.keyStore.remove(currentUserInfo.verifier);
Expand Down

0 comments on commit 8f863a8

Please sign in to comment.