WalletConnect / web3modal

A single Web3 provider solution for all Wallets
https://web3modal.com
Apache License 2.0
4.69k stars 1.3k forks source link

[bug] infinite spinning wheel - email login web3modal #2249

Open hroyo opened 3 weeks ago

hroyo commented 3 weeks ago

Link to minimal reproducible example

https://www.crypto-z.com/

Summary

I am getting an infnite spinning on email for the production deployment but not on localhost.

https://www.crypto-z.com/

No error in the console log

List of related npm package versions

"@web3modal/wagmi": "^4.1.11",
"viem": "^2.9.31",
"wagmi": "^2.8.0",
"web3": "^4.0.2"
 "vite": "^4.4.5"
linear[bot] commented 3 weeks ago

APKT-367 [bug] infinite spinning wheel - email login web3modal

hroyo commented 3 weeks ago

I actually on a different browser I am getting this error Refused to frame 'https://secure.walletconnect.com/' because an ancestor violates the following Content Security Policy directive: "frame-ancestors 'self' http://localhost: https://.vercel.app https://*.ngrok-free.app https://secure-mobile.walletconnect.com".

hroyo commented 3 weeks ago

It works on localhost so I am suspecting something to do with VERCEL or VITE React

hroyo commented 3 weeks ago

I have the error in localhost too but it works, I actually the email login access code. Just not on vercel

hroyo commented 3 weeks ago

I found the request that is not coming in vercel auth.magic.link is blocked or not triggering

https://auth.magic.link/send/rpc/auth/magic_auth_login_with_email_otp?lang=en-US&_rsc=1412i

tomiir commented 2 weeks ago

Hi @hroyo ! Thanks for the report. I believe the issue is caused by the iframe not being properly injected into your site. This can be caused by not setting up the allowed origins on your cloud project. https://docs.walletconnect.com/cloud/relay#allowlist

You can configure it here: https://cloud.walletconnect.com/app/#origin-allowlist

Please give it a try and let us know! Still we should add a timeout with an explicit error so it's less confusing on the developer side

cc @glitch-txs @velvet-shark we should add this to the email login docs as it's a requirement for it

hroyo commented 2 weeks ago

YES that did the trick.... I spend all week-end trying to figure out what was wrong with my CORS haha.

I would also add it as a Dashboard a required field because we assume, setting the homepage, and the domain verification would be enough.

Can't wait for my users to try it