Moralis Verify EVM Error

this is what I usually use:
await web3.eth.personal.sign(message, (await web3.eth.getAccounts())[0])

Hello everyone,

After exhaustively digging into the community and related threads about the same issue @ravz85 was having, I finally was able to pass the verify request with the help of @johnversus’s sample, but using a Python + React stack.

In the end, what worked for me was that I had to remove the resources, expiration_time, and not_before arguments that I was using for the request_challenge_evm method call.

So, these arguments made the trick:

reqbody = {
    "domain": env.EVM_DOMAIN,
    "statement": "Please confirm",
    "uri": env.EVM_URL,
    "timeout": env.EVM_AUTH_TIMEOUT,
    "address": address,
    "chainId": str(chain_id),
}

And the verify_challenge_evm call can go as simple as documented Here.

I hope this comment becomes useful to any other dealing with similar issues.

Cheers!!!


UPDATE

While cleaning up code I just found that removing resources argument is enough to traverse EVM Auth flow successfully =]

3 Likes