MetaMask / MetaMask/detect-provider

Allow working with strict CSPs

Open
#31 19 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
238
Forks
63
PR merge metrics
No merged PRs in 30d

Description

TIL: Our current mobile script injection technique violates some CSPs!

I just got off a call with a team that currently can't use MetaMask because their page's CSP refuses to interact with an inline script.

It would help them if we also allowed connecting via a non-injected provider. Maybe we should set up detect-provider to bring its own inpage-provider, so it allows side-stepping this issue.

I'm reaching out to them to see what CSP this might be, I think a safely strict testing csp might be `script-src: 'none'`.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing detect-provider's current mobile script injection approach and the proposed inpage-provider alternative. Reproduce the problem with a strict CSP such as script-src: 'none', then define how a non-injected provider should connect. Done means MetaMask detection or connection works without violating the target CSP.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api, web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.