I was trying with the email_passwordless in web-modal SDK. But continuously facing this error. It seems like a CORS error. But I also tried with the local React project. It seems ok in there and shows the OTP perfectly.
Looking into this example: https://web3auth.io/docs/sdk/pnp/web/modal/whitelabel#example-1
Check-in here: Sign in with the Email field. https://shop.bcl.xyz/collections/the-masked-singer-experience
let web3authh = new window.Modal.Web3Auth({
chainConfig: {
chainNamespace: "eip155",
rpcTarget: "https://polygon-rpc.com",
blockExplorer: "https://polygonscan.com/",
chainId: "0x89",
dChainId: "137",
displayName: "Polygon Mainnet",
ticker: "matic",
tickerName: "Matic",
decimals: 18,
},
clientId: clientIdObj.cyan,
web3AuthNetwork: "cyan", // cyan for prod, mainnet for stage and testnet for dev
enableLogging: true,
uiConfig: {
mode: "dark",
loginMethodsOrder: ["google", "apple", "twitter", "discord"],
appLogo: __APP_LOGO,
modalZIndex: "99998",
defaultLanguage: "en",
},
});
const openloginAdapter = new window.OpenloginAdapter.OpenloginAdapter({
loginSettings: {
mfaLevel: "none", // this is imp
},
adapterSettings: {
network: "cyan",
uxMode: "redirect",
_iframeUrl: "https://fox.web3auth.com",
whiteLabel: {
appName: "Maskverse",
theme: {
primary: "#9333EA",
},
logoLight: __APP_LOGO,
logoDark: __APP_LOGO,
defaultLanguage: "en",
},
},
});
const openloginConfig = {
"openlogin": {
label: "openlogin",
loginMethods: {
// email_passwordless: {
// name: "email_passwordless",
// showOnModal: false
// },
sms_passwordless: {
name: "sms_passwordless",
showOnModal: false
}
}
}
}
await web3authh.initModal({ modalConfig: openloginConfig });