Okay, so to anyone who stumbles upon this post in despair, this is what fixed it.
First of all, changing the domain and uri in authService.ts doesn’t seem to change anything. So to change the domain and url, you have to either :
hardcode it in the same authService.ts file, change this
const result = await Moralis.Auth.requestMessage({
address,
chain,
networkType,
domain:url.hostname,
uri: url.ToString(),
statement: STATEMENT,
notBefore: now.toISOString(),
expirationTime: expirationTime.toISOString(),
timeout: TIMEOUT,
});
into this
const result = await Moralis.Auth.requestMessage({
address,
chain,
networkType,
domain: ‘domain’,
uri: ‘https://domain’,
statement: STATEMENT,
notBefore: now.toISOString(),
expirationTime: expirationTime.toISOString(),
timeout: TIMEOUT,
});
or, open config.ts and change the SERVER_URL parameter (haven’t tested this out yet, but should work)