stellar / freighter

Stellar browser extension
81 stars 25 forks source link

[SPIKE] Explore limiting connected dapps to certain public keys #1652

Open piyalbasu opened 1 week ago

piyalbasu commented 1 week ago

Right now when you connect a dapp to Freighter, the connection is global. This means if I have 3 addresses in Freighter, and I connect dapp.com, dapp.com can request and instantly receive any one of those 3 public keys on any network.

For now, "connection" just means that Freighter will transmit the public key without prompting the user. But in the future, we may want to give a connected dapps more rights and privileges. In that case, we will want to limit what accounts a dapp can connect to by having a Freighter user have to opt each one of their addresses in.

For example: If I connect public key G1 on Testnet to a dapp, the dapp shouldn't be connected to G2 or G1 on Mainnet.