Hey,
while dapps can requestAccounts
they currently cannot provide a UI for users to disable access (logout) without implementing it their own way (in an unreliable manner).
This feature is useful for applications that want to provide access choice for different wallets, built-in vs web-based wallet like portis, bitski…, as it would allow the application to disconnect from the built-in wallet, giving them back choice.
You can imagine the flow this way
if (isBuiltInWalletEnabled()) {
use builtin wallet
} else if(iswebWalletLoggedIn()) {
use web wallet
} else {
offerChoice()
}
where the users could go back to the choice by closing access to the built-in accounts (if connected this way) or via the web wallet logout method (if connected this way).
While this is currently achievable by storing a cookie or a value in localStorage to remember the last used wallet and let user forget it, it is unreliable as it relies on cookie/local storage.
I propose thus
{
"id": 1,
"jsonrpc": "2.0",
"method": "eth_closeAccounts"
}
that would reset account access for that particular application