bytesbay / web3-token

Web3 Token is a new way to authenticate users in a hybrid dApps using signed messages. Implementation of EIP-4361.
380 stars 50 forks source link

Unable to retrieve nonce in the token verification #49

Closed riowelfaleno closed 1 year ago

riowelfaleno commented 1 year ago

Hi, I've put in the nonce and request_id during the Web3Token.sign, but the nonce and the request_id was not returned during Web3Token.verify. Any ideas on how to solve this?

bytesbay commented 1 year ago

@xymontana Hey let me check

bytesbay commented 1 year ago

Fixed in 57a09e1. Thanks alot for the report. Just update the package to 1.0.4.

riowelfaleno commented 1 year ago

thank you!

riowelfaleno commented 1 year ago

Fixed in 57a09e1. Thanks alot for the report. Just update the package to 1.0.4.

Hi I see that you've fixed the request-id. But regarding the nonce, shouldn't it be like this:

   if (params.nonce) {
        body.nonce = params.nonce;
    }