Closed derekpierre closed 1 month ago
I think this likely comes from the usage of AnyUrl
from pydantic, which requires scheme://
The ABNF parser accounts for RFC 3986 properly.
https://github.com/spruceid/siwe-py/blob/2d5983412a9279b28db1712326cc2fe257b2e084/siwe/siwe.py#L174
Would be simple to create a custom validator for the fields, but also need to account for it in the regex validator, which probably requires some discussion as to why that's in there.
It seems that I was using a much older version that I expected, v2.4.1, 😅 . This was due to some sub-dependencies limitations.
v4.1.0 does not have this issue, both for abnf, and non-abnf. 👍
Cool! Wasn't sure what was throwing the validation error so my comments above were at best guesses lol. I should have just recreated :)
In the
siwe
library (typescript) the following URIs within a SIWE message are valid when creating aSiweMessage
object.did:key:z6Mkn6dGmArGE8fX55C7EU5pk7XUV5KriRStHQ9BTXGgduaJ
ceramic://*
However, in
siwe-py
(python) these URIs are deemed invalid when creating aSiweMessage
object.To give the full context, the following EIP4361 message is valid for
siwe
, but not valid when usingsiwe-py
:siwe-py
raises the following: