I want to disconnect metamask wallet using web3 or ether.js But I cannot find any function to disconnect programly.
Asked
Active
Viewed 2,531 times
1 Answers
0
It can not be done programmatically, because it is up to the user to disconnect/connect, you have no control(from code level) over metamask wallet. You just simulate flow of logging in and logging out by checking if you can get access to user's wallet accounts.

Milos Pavlovic
- 1,355
- 1
- 2
- 7