Hello,
I have been using Moralis Authentication API and it was working beautifully until recent Metamask API.
here is our message configuration for moralis from docs
const config = {
domain: 'amazing.finance',
statement: 'Please sign this message to confirm your identity.',
uri: process.env.REACT_URL,
timeout: 60,
};
so now metamask considers this as a bad domain and sign message never shows up on metamask. when we manually fix the message to have domain of https://amazing.finance, then sign message show up and works
(for example on frontend I can replace ‘amazing.finance’ with ‘https://amazing.finance’ and metamask accepts it and works, but of course on backend the message - signature comparison fails
the thing is when I send config with
domain: ‘https://amazing.finance’,
Moralis api does not accept this domain format and gives this error
MoralisError [Moralis SDK Core Error]: [C0006] Request failed, Bad Request(400): domain must be a valid domain name
the previous code still works for metamask 10.25
any suggestion on this?
thanks