Skip to content

Commit 10c9e8e

Browse files
committed
Invalidate the session only
1 parent 15c9486 commit 10c9e8e

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

rn-bare-example/App.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,7 @@ export default function App() {
6060
}
6161

6262
setConsole('Logging out');
63-
const result = await web3auth.logout({
64-
redirectUrl: resolvedRedirectUrl,
65-
});
63+
const result = await web3auth.logout();
6664

6765
if (result) {
6866
setUserInfo(undefined);

src/Web3Auth.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import {
1717
OpenloginUserInfo,
1818
SdkInitParams,
1919
SdkLoginParams,
20-
SdkLogoutParams,
2120
} from "./types/sdk";
2221
import { SessionData, State } from "./types/State";
2322

@@ -122,13 +121,13 @@ class Web3Auth implements IWeb3Auth {
122121
return true;
123122
}
124123

125-
async logout(options: SdkLogoutParams): Promise<boolean> {
124+
async logout(): Promise<boolean> {
126125
await this.sessionTimeout();
127-
const result = await this.request("logout", options.redirectUrl, options);
128-
if (result.type !== "success" || !result.url) {
129-
log.error(`[Web3Auth] logout flow failed with error type ${result.type}`);
130-
throw new Error(`logout flow failed with error type ${result.type}`);
131-
}
126+
// const result = await this.request("logout", options.redirectUrl, options);
127+
// if (result.type !== "success" || !result.url) {
128+
// log.error(`[Web3Auth] logout flow failed with error type ${result.type}`);
129+
// throw new Error(`logout flow failed with error type ${result.type}`);
130+
// }
132131
this._syncState({
133132
privKey: "",
134133
coreKitKey: "",

0 commit comments

Comments
 (0)