How to start Moralis with version 2?

Yes, very close.

This picture above is log params send to verify :).

Those are not the parameters, the parameters are the message and the signature

That is signature and data send to verify
I send to ```
https://YOUR.PARSE-SERVER.HERE/parse/users

with authData 

const authData = {
id: addressLogin,
signature: signature,
data: message,
};

For Moralis.auth.verify function try to log the parameters

Yes, bro. That is authData I logged

image

Try to log the parameters separately just to make sure that they have the value that you expect. You logged there an entire object and not each parameter one by one.

I tried to log signature and data:
image

that timestamp for Issued At seems to be from the past, from few hours ago, you are trying with the same message multiple times?

Yes, I saw timeout 15 min for signature but I sign asap still not working :(.

I got this error:

"code": "ERR_JWS_INVALID",
        "name": "JWSInvalid"

What is JWS ?

I sign message by code from Unity, what wrong in signer function ? Cause for error Invalid data in verify function Moralis ?

image

you can change that 15 seconds timeout to 55 seconds in code

you have to make care at the signed message, it has to be identical with the one that you received initially , if you sign the message with a private key in backend then you have make sure that you use the equivalent of signing a message and not the equivalent of signing a transaction

you can use this example in python to test:

1 Like

Thanks Cryptokid, I try now

You send y, not send x sig ?

image

it is only converted to hex there because it is in binary initially in that particular case, this shouldnโ€™t be the case for you

1 Like

My headers is correct ?

I checked get my message original

localhost wants you to sign in with your Ethereum account:\n0x1EEAB8cd1f658398C0C4409000bF648100a0969b\n\nPlease sign this message to confirm your identity.\n\nURI: http://localhost:1337/server\nVersion: 1\nChain ID: 1\nNonce: inMfRbeeXitCDFqGi\nIssued At: 2023-02-18T13:55:59.864Z\nExpiration Time: 2023-02-18T14:10:59.713Z\nNot Before: 2023-02-18T13:55:59.713Z

After axios auto convert object to JSON: \n => \\n . I thought this is cause. I donโ€™t know /users remove \ or not when get data.
image

this could be an issue if it happens

you can check the contents of that function named Moralis.Auth.verify and change it if needed

1 Like

Yeah, thanks for support Cryptokid.

Done, I authen OK

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.