Skip to main content
Before this: create and initialize a Dynamic client (see Creating a Dynamic Client) and read User and Session Management. When a session ends, the SDK does two things to every connected wallet provider: it sends a remote disconnect signal to the wallet (for example 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:
  • disconnectWallets on logout() and useLogout() controls an explicit logout call. It defaults to true.
  • disconnectWalletsOnSessionEnd on createDynamicClient() 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 to true.
Setting either option to 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

Pass disconnectWallets: false when calling logout() to keep the wallet-side session for that call only:
An explicit 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

Set disconnectWalletsOnSessionEnd: false on createDynamicClient() to keep wallet-side sessions alive when the session ends without an explicit logout() call:
The config flag does not affect explicit 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.
Last modified on December 1, 2026