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

fix verification negative tests about signature #102

Merged
merged 2 commits into from
Sep 1, 2022

Conversation

navigatrum
Copy link
Contributor

@navigatrum navigatrum commented Aug 26, 2022

The tests "malformed signature" and "wrong signature" were actually failing because of the expiration time, which was less than now, and not because of the signature. This because the expiration time check is performed before the signature check. See: https://github.com/spruceid/siwe/blob/main/packages/siwe/lib/client.ts#L259-L313

[link edited]

The tests "malformed signature" and "wrong signature" were actually failing because of the expiration time, which was less than `now`, and not because of the signature. This because the expiration time check is performed before the signature check. See: https://github.com/spruceid/siwe/blob/main/packages/siwe/lib/client.ts#L263-L276
@sbihel sbihel merged commit 327a532 into spruceid:main Sep 1, 2022
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.

2 participants