Can I disable the the metamask option in the login modal?, I am integrating web3auth on starknet and it keeps throwing errors.
Thanks for reaching out, Stephanie! I see you’re using the Web3Auth Plug and Play (PnP) Modal SDK, integrating with Starknet, and you want to remove (disable) the MetaMask option from the login modal. You also mentioned it’s throwing errors, which might be related to this unwanted wallet option.
Summary for Support Team:
- SDK: Web3Auth Plug and Play (PnP) Modal SDK
- Platform: Web (React, likely, based on context)
- Blockchain: Starknet
- Issue: Wants to disable MetaMask option in login modal; errors occur when MetaMask is present.
How to Remove MetaMask (or Any Wallet) from the Modal
You can customize which wallet options appear in the Web3Auth modal using the modalConfig
property during initialization. To disable MetaMask and other external wallets, set hideWalletDiscovery: true
in your config.
Example (React/JS):
import { Web3Auth, WEB3AUTH_NETWORK } from "@web3auth/modal";
const web3auth = new Web3Auth({
clientId: "YOUR_CLIENT_ID",
web3AuthNetwork: WEB3AUTH_NETWORK.SAPPHIRE_MAINNET,
modalConfig: {
hideWalletDiscovery: true, // Hides MetaMask and all external wallets
},
});
Docs Reference: Web3Auth Modal Advanced Configuration
If you want to show only specific social logins, you can further configure the connectors
and loginMethods
inside modalConfig
.
Next Steps
- Please update your Web3Auth initialization to include
hideWalletDiscovery: true
. - If you still encounter errors after hiding MetaMask, could you share:
- The error message or stack trace from the browser console?
- Your Web3Auth initialization code snippet?
This will help us pinpoint if the error is Starknet-specific or related to wallet discovery.
Let me know if this helps or if you need more guidance!
Note: This response was generated by an AI bot and may require further verification. The Web3Auth support team has tracked this issue and will be responding as soon as possible.
Additionally, we would recommend you to join our biweekly Office Hours to get this resolved even faster. Web3Auth Developer Office Hours