opensquare-network / subsquare

https://www.subsquare.io
6 stars 6 forks source link

Incorrect challenge answer received #4127

Closed carlosala closed 3 months ago

carlosala commented 3 months ago

Hi! I was trying to verify my identity with the challenge to the wallet ("signRaw" feature), and I was getting Incorrect challenge answer. I debugged it and discovered that the signer I'm using (Ledger) returns the signature with a 0x00 prefix. Then, the signature is 65 bytes long. I suppose that in the API you're not accepting this version, but it's in general accepted in Polkadot. Here you have an example of how Polkassembly verifies the signature, underneath Polkadot-JS takes into account this prefix. In general, in the Polkadot Spec is specified that extrinsics are prefixed to make the receiver know about the kind of signature used. Thanks!

wliyongfeng commented 3 months ago

@carlosala Thanks for this issue. We also use signatureVerify from @polkadot/util-crypto. Can we talk more details in telegram: https://t.me/wliyongfeng?

carlosala commented 3 months ago

This has been solved, now Ledger users can login in Subsquare! 🎉 Thanks for the responsiveness! 🎉