MetaMask / MetaMask/metamask-extension

Add message-signing permission

Open
#12,008 4 comments 0 reactions 0 assignees View on GitHub
area-permissions area-signatures T08-featureRequest team-confirmations-planning
Dominant language
TypeScript
Stars
13.2k
Forks
5.6k
Avg merge
2d 5h
Merged PRs (30d)
451

Description

I have a dApp which frequently makes calls to eth_signTypedData using MetaMask, which presents a signing dialog to the user.
Because there are so many of these, users can be easily annoyed and get permission fatigue, just quickly clicking to sign, and experiencing interruption in the flow of the application.

It would be much better if the dApp could request a message-signing permission and if the user has granted it, calls to eth_signTypedData would return automatically as if the user had clicked "Sign" without requiring the user interaction. This permission could be added/revoked at any time, like other optional permissions.

**Steps to reproduce**
1. Visit https://metamask.github.io/test-dapp/
2. Click "Connect" in the center near the top of the page
3. Notice the permissions-granting flow only including the one permission to view addresses; grant connection & permission.
4. Scroll down to the box which says "Sign Typed Data" and click Sign.
5. Notice a popup asking you to sign a message.
6. Click to sign.
7. Notice the result showing a signature.
8. Repeat steps 4-7 dozens of times to simulate dapp use.
9. Notice you get tired of the MetaMask popup, and wish you could grant a permission to skip 5-6.

I would be happy to help with a PR to implement this if someone can help point me to approximately the right places in the code base where alterations would most likely be needed, as I'm not that familiar with the code base myself at this point.

**Browser details (please complete the following information):**
- OS: Windows 10
- Hardware Wallet: None
- Browser: Chrome 92.0.4515.159 (Official Build) (64-bit)
- MetaMask Version: 10.0.3

Contributor guide

Open the contributing guide

Research direction

Start by tracing the eth_signTypedData request handling and the existing optional-permissions flow in the MetaMask extension. Review how the test dapp exercises connection and signing permissions; done means a dapp can request, revoke, and safely use a message-signing permission with appropriate user-facing behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
authorization
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.