Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the metamask-extension-provider work with privacy mode #5950

Open
Powersource opened this issue Dec 19, 2018 · 18 comments
Open

Make the metamask-extension-provider work with privacy mode #5950

Powersource opened this issue Dec 19, 2018 · 18 comments
Labels
area-documentation Issues relating to documentation, in the codebase and off. area-provider Relating to the provider module. type-enhancement

Comments

@Powersource
Copy link

The steps described in this blogpost do not work when connecting from another browser extension (i.e. when using the metamask-extension-provider).

We really hope this will be fixed before privacy mode is turned opt-out, since our app would otherwise break for most users.

@bdresser
Copy link
Contributor

cc @bitpshr @danfinlay

@danfinlay
Copy link
Contributor

Oh cool! You may be the first metamask extension api consumer we’re aware of! Very cool to see what you’re building. Would this be similar to Brave’s tipping system?

We’ll be sure to keep that module up to date, please reach out with any issues you encounter, you’re likely the first person hitting some of them.

danfinlay added a commit that referenced this issue Jan 4, 2019
Fixes #5950 when combined with an update to
`metamask-extension-provider`.
@ErikBjare
Copy link

@danfinlay There are some similarities, but Thankful is different because:

  • There is no special token. We currently support ETH and want to support ERC-20 tokens (such as Dai and other stablecoins)
  • It is browser-independent (as it should be)
  • We won't have a centralized sign-up process for creators (like Brave does)
  • We don't want to be limited to the web, we want to let users support creators of music, podcasts, and software (not there yet, but we've come a long way on the data collection part in ActivityWatch)

We're working on other differentiating features (such as giving supporters tokens for supporting a creator), but we're still very much in an exploratory stage.

Thanks for fixing the issue for us so quickly, we'll get to implementing it in our extension soonish.

@danfinlay
Copy link
Contributor

It isn’t quite fixed yet, hit a couple snags that would be impossible with a rewrite of a portion of code, which also presents the opportunity for some other improvements. Hoping to have the fix done in this coming week.

@Powersource
Copy link
Author

Any updates on this? :)

@ErikBjare
Copy link

ErikBjare commented Jul 4, 2019

@danfinlay Any updates? We're aiming for a release soon and would rather not want to encourage people to turn off privacy mode.

@danfinlay
Copy link
Contributor

Apologies, the refactor to fix this turned into a larger upgrade of our login system, in an effort that is still ongoing. In the meanwhile it also seems the eth_requestAccounts RPC method will also trigger the login confirmation.

@Powersource
Copy link
Author

As I mention here, eth_requestAccounts unfortunately doesn't work in privacy mode either :/

@danfinlay
Copy link
Contributor

Sorry it's taken so long. As it stands, this issue will be solved when this branch is merged into master, as it unifies all of the MetaMask communication under a common interface (today the enable() method uses a separate transport from the rest of the RPC that is unavailable cross-extension, making it much more configuration-heavy).

@deluca-mike
Copy link

deluca-mike commented Aug 20, 2019

This doesn't explain why there are controller references to eth_requestAccounts in metamask's code:

if (req.method !== 'eth_requestAccounts') return next()
( proceed with unlock/approval logic )

which does not seem to fully execute. Sadly prettying the code in order to set a breakpoint to test is failing in chrome. Might load a dev version of metamask to test out.

@deluca-mike
Copy link

deluca-mike commented Aug 20, 2019

I've fixed this in #7039. As suspected, the approval logic threw trying to fetch site metadata for an origin that was an extension id. I've added the necessary logic to fetch extension metadata (chrome only, and requires "management" permissions). Tested this and eth_requestAccounts RPC call brings up the appropriate approval dialog in MetaMask with the extension name and icon.

@johngrantuk
Copy link

Just to confirm the latest state - this is still not possible right? I also can't seem to find an option in my MetaMask to disable privacy mode?

@danfinlay
Copy link
Contributor

I also can't seem to find an option in my MetaMask to disable privacy mode?

You can "disable privacy mode"/connect on a site-by-site basis in settings > connections.

@johngrantuk
Copy link

Thanks for the tip but I don't actually have any option for that in my MetaMask, it just shows each Connected site but these are unclickable and don't have any "disable privacy mode" option.

@ErikBjare
Copy link

ErikBjare commented Sep 11, 2019

@johngrantuk There seems to no longer be a way to disable privacy mode, just manually adding allowing an exception. But the suggestion by @danfinlay worked fine for me:

  1. Browse to the site/extension you want to allow
  2. Go to Metamask -> Settings -> Connections
  3. Check that the "Allow Site" textbox has the correct address in it (in my case the extension ID)
  4. Click "Connect"

@whymarrh
Copy link
Contributor

@Powersource can we close this? Is there anything outstanding in the latest version of MM?

@Powersource
Copy link
Author

I haven't tested it lately but since this issue MetaMask/extension-provider#3 is still open I would guess it's still a problem.

@Gudahtt
Copy link
Member

Gudahtt commented Apr 16, 2020

This has been supported by metamask-extension since v7.4.0, but metamask-extension-provider still needs to be updated (possibly just the example and docs, though I haven't confirmed that).

@Gudahtt Gudahtt added area-documentation Issues relating to documentation, in the codebase and off. type-enhancement labels Jan 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-documentation Issues relating to documentation, in the codebase and off. area-provider Relating to the provider module. type-enhancement
Projects
None yet
8 participants