web3modal icon indicating copy to clipboard operation
web3modal copied to clipboard

[bug] infinite spinning wheel - email login web3modal

Open hroyo opened this issue 1 year ago • 7 comments

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"

hroyo avatar May 10 '24 18:05 hroyo

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 avatar May 10 '24 18:05 hroyo

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

hroyo avatar May 10 '24 19:05 hroyo

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

hroyo avatar May 10 '24 20:05 hroyo

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

hroyo avatar May 10 '24 21:05 hroyo

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/<projectId>#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

tomiir avatar May 14 '24 09:05 tomiir

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

hroyo avatar May 14 '24 14:05 hroyo