File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ export class Web3Auth extends SafeEventEmitter<Web3AuthSfaEvents> implements IWe
102102 }
103103
104104 get connected ( ) : boolean {
105- return Boolean ( this . sessionManager ?. sessionId ) ;
105+ return this . status === ADAPTER_STATUS . CONNECTED ;
106106 }
107107
108108 get provider ( ) : IProvider | null {
@@ -356,11 +356,12 @@ export class Web3Auth extends SafeEventEmitter<Web3AuthSfaEvents> implements IWe
356356
357357 async logout ( ) : Promise < void > {
358358 if ( ! this . connected ) throw WalletLoginError . notConnectedError ( "Not logged in" ) ;
359- const sessionId = this . currentStorage . get < string > ( "sessionId" ) ;
360- if ( ! sessionId ) throw WalletLoginError . fromCode ( 5000 , "User not logged in" ) ;
361359
362- await this . sessionManager . invalidateSession ( ) ;
363- this . currentStorage . set ( "sessionId" , "" ) ;
360+ if ( this . coreOptions . mode !== SDK_MODE . NODE ) {
361+ await this . sessionManager . invalidateSession ( ) ;
362+ this . currentStorage . set ( "sessionId" , "" ) ;
363+ }
364+
364365 this . updateState ( {
365366 privKey : "" ,
366367 userInfo : {
You can’t perform that action at this time.
0 commit comments