This was working fine for the past 2 weeks and it suddenly stopped working. The web3auth modal popups up but once I click to login the console.log error appears:
Access to fetch at 'https://rpc-mumbai.maticvigil.com/' from origin 'http://localhost:3031' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
This is my code:
const user = await Moralis.authenticate({
provider: 'web3Auth',
clientId: process.env.WEB3AUTH_CLIENTID,
chainId: '0x13881',
});