Hi, I tried to sign message and send to Parse to verify but got error Error: Moralis auth failed, invalid data
I mistake some where ?
async function signMessage(provider, message) {
try {
const ethersProvider = new ethers.BrowserProvider(provider);
const signer = await ethersProvider.getSigner();
// Sign the message
const signedMessage = await signer.signMessage(message);
return signedMessage;
} catch (error) {
return error;
}
}
const {message} = await Moralis.Cloud.run('requestMessage', {
address: account,
chain: parseInt(process.env.NEXT_PUBLIC_MAIN_NET_CHAINID, 16),
network: 'evm',
});
const signedMessage = await signMessage(web3authProvider, message);