I want to get all the accounts that a user has added in Metamask. I tried all web3.js methods to get accounts, but I always get just one account which is always the currently selected one.
According to web3.js documentation, web3.eth.getAccounts()
should return all accounts that this node controls. However, I am getting an array with just the currently selected one. Needless to say, I have multiple accounts created in Metamask.