Window.ethereum.disable() for logging out of provider

Currently web3 providers offer an .enable() method for allowing the dapp to connect but there doesn’t exist a method to disconnect. Standardizing around a .disable() method on the provider would allow dapps to display a logout button if this disable method is available. This would be beneficial for providers that offer standard login experiences like Portis, Squarelink, Authereum, etc. and as a dapp developer you don’t have to think about how to handle logging out for each provider. I believe web3connect does something similar with a .close() method on the provider.

What are your thoughts on standardizing around an optional .disable() method on the provider for disconnecting and logging users out of the provider on the dapp?


Hi @miguelmota
I agree this would be useful. I actually proposed the same thing to be added to 1102 : EIP-1102: Opt-in provider access

1 Like

Following up here… Obviously disable() hasn’t yet made it to the library, but are there any proven methods to disconnect?

If not… how does one disconnect for testing purposes? I don’t see anything in the local browser indicating ethereum is “active”.

We kindly await this feature