Skip to content

Add Sign-in with Ethereum Test Cases#164

Merged
adonesky1 merged 12 commits intoMetaMask:mainfrom
spruceid:main
Dec 7, 2022
Merged

Add Sign-in with Ethereum Test Cases#164
adonesky1 merged 12 commits intoMetaMask:mainfrom
spruceid:main

Conversation

@skgbafa
Copy link
Copy Markdown
Contributor

@skgbafa skgbafa commented Apr 7, 2022

(EIP-4361) Sign-in with Ethereum or SIWE is a standard message format that wallets can parse. In order to facilitate easy testing of some various test cases of this format, 4 cases are presented for signing with a wallet:

  1. A normal SIWE message
  2. A SIWE message with optional parameters included
  3. A SIWE message with a different domain than the one sending the message (simulating a malicious use of SIWE)
  4. A SIWE message with a different account than the one signing the message (simulating a error on the user's part)
  5. A malformed SIWE message that doesn't meet the spec (missing a required field)

@skgbafa skgbafa requested a review from a team as a code owner April 7, 2022 16:43
@adonesky1
Copy link
Copy Markdown
Contributor

adonesky1 commented Dec 5, 2022

For the malicious/malformed cases should we be doing some validation in app?

@BelfordZ
Copy link
Copy Markdown

BelfordZ commented Dec 7, 2022

@adonesky1 I think he has some of that going here: MetaMask/metamask-extension#16616

Copy link
Copy Markdown

@BelfordZ BelfordZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good.

If/when extension adds better support for SIWE spec, the error cases will change for the better.

@adonesky1 adonesky1 merged commit 02af74a into MetaMask:main Dec 7, 2022
@adonesky1 adonesky1 mentioned this pull request Jan 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants