Archived Content from Web3Auth Community
This topic was originally posted by dev12 on 10/8/2023.
This content has been migrated from our previous community forum to preserve valuable discussions.
Iâve upgraded to the growth plan, running on Sapphire mainnet. When attempting to configure the modal, by forcing the connect your wallet to be the primary button (shown first), and to hide some of our unused/not ready social logins, it seems like the uiConfig doesnât do anything. Even in testing on ready/used social logins, there is no change. I also cannot hide the torus wallet.
Version:
â@web3auth/baseâ: â^7.0.1â,
â@web3auth/base-providerâ: â^7.0.1â,
â@web3auth/coinbase-adapterâ: â^7.0.1â,
â@web3auth/ethereum-providerâ: â^7.0.1â,
â@web3auth/metamask-adapterâ: â^7.0.1â,
â@web3auth/modalâ: â^7.0.2â,
â@web3auth/openlogin-adapterâ: â^7.0.1â,
â@web3auth/phantom-adapterâ: â^7.0.1â,
â@web3auth/solana-providerâ: â^7.0.1â,
â@web3auth/solana-wallet-connector-pluginâ: â^7.0.1â,
â@web3auth/solflare-adapterâ: â^7.0.2â,
â@web3auth/torus-wallet-connector-pluginâ: â^7.0.1â,
â@web3auth/wallet-connect-v2-adapterâ: â^7.0.2â,
Initialization Code:
const web3auth = new Web3Auth({
clientId: process.env.NEXT_PUBLIC_WEB3AUTH_CLIENT_ID,
web3AuthNetwork: âsapphire_mainnetâ, // mainnet, aqua, cyan or testnet
chainConfig: {
chainNamespace: CHAIN_NAMESPACES.SOLANA,
chainId: â0x1â, // Please use 0x1 for Mainnet, 0x2 for Testnet, 0x3 for Devnet
rpcTarget: process.env.NEXT_PUBLIC_RPC_URL, // This is the public RPC we have added, please pass on your own endpoint while creating an app
}, uiConfig: { appName: "xxxxxx", appUrl: "https://xxxxxx.so", logoLight: "https://arweave.net/DZS-xxxxxx?ext=svg", logoDark: "https://arweave.net/DZS-xxxxxx?ext=svg", mode: 'dark', primaryButton: "externalLogin", loginMethodsOrder: [ "google", "discord", "twitter", "wechat" ], [WALLET_ADAPTERS.TORUS_SOLANA]:{ showOnModal:false, showOnDesktop:false, showOnMobile:false, }, [WALLET_ADAPTERS.WALLET_CONNECT_V2]: { showOnModal: true }, }, }) // Configure adapters const openloginAdapter = new OpenloginAdapter({ loginSettings: { mfaLevel: "optional", // Pass on the mfa level of your choice: default, optional, mandatory, none }, adapterSettings: { whiteLabel: { appName: "xxxxxx", logoLight: "https://arweave.net/DZS-xxxxxx?ext=svg", logoDark: "https://arweave.net/DZS-xxxxxx?ext=svg", defaultLanguage: "en", mode: 'dark' // whether to enable dark mode. defaultValue: false }, loginConfig: { email_passwordless: { verifier: "xxxxxx-email-passwordless", // Pass the Verifier name here typeOfLogin: "jwt", // Pass on the login provider of the verifier you've created jwtParameters: { domain: "https://xxxxxx-so.us.auth0.com", client_id: "xxxxxx", verifierIdField: "name", } }, twitterauth0: { verifier: "xxxxxx-twitter", // Pass the Verifier name here typeOfLogin: "twitter", // Pass on the login provider of the verifier you've created clientId: "xxxxxx", // Pass on the Google `Client ID` here // verifierSubIdentifier: "Sub" }, discord: { verifier: "xxxxxx-discord", // Pass the Verifier name here typeOfLogin: "discord", // Pass on the login provider of the verifier you've created clientId: 'xxxxxx', }, githubauth0: { verifier: "xxxxxx-github", typeOfLogin: "github", jwtParameters: { domain: "https://xxxxxx-so.us.auth0.com", client_id: "xxxxxx", verifierIdField: "Sub", } }, googleauth0: { verifier: "xxxxxx-google-auth0", typeOfLogin: "google", jwtParameters: { domain: "https://xxxxxx-so.us.auth0.com", client_id: "xxxxxx", verifierIdField: "Sub", } }, facebook: { verifier: "xxxxxx-facebook", typeOfLogin: "facebook", jwtParameters: { client_id: "xxxxxx", } }, twitch: { verifier: "xxxxxx-twitch", typeOfLogin: "twitch", showOnModal: false, }, reddit: { verifier: "xxxxxx-reddit", typeOfLogin: "reddit", showOnModal: false, }, linkedin: { verifier: "xxxxxx-linkedin", typeOfLogin: "linkedin", showOnModal: false, showOnDesktop: false, showOnMobile: false } } } }); web3auth.configureAdapter(openloginAdapter);const solflareAdapter = new SolflareAdapter({ clientId: process.env.NEXT_PUBLIC_WEB3AUTH_CLIENT_ID, }); web3auth.configureAdapter(solflareAdapter); setWeb3auth(web3auth); await web3auth.initModal(); // initialize modal setProvider(web3auth.provider); if (web3auth.connected) { await connect(web3auth); return; };