Self hosted Moralis V1, how to use wallet connect v2 with vanilla js

Wth No error no anything
here’s the code

const handleAuth = async (provider) => {
            const ethersProvider = await Moralis.enableWeb3({throwOnError: true, provider, projectId: WALLET_CONNECT_PROJECT_ID})
            const signer = ethersProvider.getSigner()
            const account = await signer.getAddress()
            const chainId = Moralis.chainId

            const { message } = await"requestMessage", { address: account, chain: parseInt(chainId, 16), network: "evm", })

            const user = await Moralis.authenticate({
                signingMessage: message,
                newSession: true,
                provider: provider,
                projectId: WALLET_CONNECT_PROJECT_ID,
                rpcMap: {
                    '1': `${chainId}&projectId=${WALLET_CONNECT_PROJECT_ID}`,
                qrModalOptions: {
                    themeMode: 'light',

            const currentUser = Moralis.User.current()

PS: the user has not been registred on the database, when i click confirm the WalletConnect QRcode modal just closes and reopens

Does it get to execute this line or it stops at one of the previous lines?

No It does not get executed

the last operation in the network is the requestMessage request

Without this part it was asking to sign a message?

Yes, but showed the error that the auth data is incorrect

and i have to remove all the code above the “Moralis.authenticate({”

specially the enableWeb3 function to get it back into showing the sign message page

And now it works as expected if you only add that line that sets the message?

No Nothing Works as expected

Code 1:

In This code the "Moralis.authenticate({}) " does not get executed,
And this code raises an error that the auth data is invalid:

Code 2

In this second code, try to set the message to sign, only to set the message without other lines

Just did, same errors

1- POST http://localhost:1337/server/users 404 (Not Found)
2- error: Moralis auth failed, invalid data

i played with the code, in so many ways, but still same result

Still, No Luck, cuz I got nothing from my side?

How does the data look when you get this error? What is the format of the message that you get to sign?

it’s a string “Moralis Application” or something similar

it’s “Moralis Authentification”

That is all? That is all the message that is signed?

Yes, that’s all of it with the domain that’s being sent from

When you use wallet connect and you set the message that you get from that cloud function, do you get to sign a similar message how you get to sign with MetaMask?