wallet_revokePermissions for EIP-1193 wallets or session end for WalletConnect wallets), and it cleans up local state and listeners. The remote signal makes the wallet forget the connection, so the user is prompted for wallet permissions again on the next login.
Two options let you skip the remote signal while keeping the local cleanup, so users are not re-prompted:
disconnectWalletsonlogout()anduseLogout()controls an explicit logout call. It defaults totrue.disconnectWalletsOnSessionEndoncreateDynamicClient()covers every other way a session can end, such as an expiring or revoked session, a failed refresh, or an action that ends authentication like account deletion. It also defaults totrue.
false keeps the wallet-side session alive, so the wallet does not ask for permissions again on the next login. SDK-local state and listeners are always cleaned up regardless of the option.
Disconnect on explicit logout
PassdisconnectWallets: false when calling logout() to keep the wallet-side session for that call only:
- JavaScript
- React
disconnectWallets value always wins for that call: logout({ disconnectWallets: false }) skips the remote signal even when disconnectWalletsOnSessionEnd is true, and logout({ disconnectWallets: true }) disconnects even when it is false.
Disconnect on other session ends
SetdisconnectWalletsOnSessionEnd: false on createDynamicClient() to keep wallet-side sessions alive when the session ends without an explicit logout() call:
logout() calls; those follow the disconnectWallets param described above and disconnect by default.
Keeping the wallet-side session alive means the wallet still remembers the granted permissions. Whether the wallet reuses that session on the next connect is up to the wallet; some wallets always show a connect prompt regardless of prior permissions.