Skip to main content

Whitelabel

Web3Auth allows complete whitelabeling with application branding for a consistent user experience. You can customize three different aspects:

  • UI elements: Customize the appearance of modals and components
  • Branding: Apply your brand colors, logos, and themes
  • Translations: Localize the interface for your users
info

All of these settings can be easily managed directly from the Web3Auth Dashboard. Once you update your branding, or UI preferences there, the changes will automatically apply to your integration. As this is the recommended approach, we will not cover basic customization via the SDK here. Instead, this guide focuses on advanced customization options available through the SDK.

note

This is a paid feature and the minimum pricing plan to use this SDK in a production environment is the Growth Plan. You can use this feature in Web3Auth Sapphire Devnet network for free.

Customizing the Web3Auth Modal

While basic modal appearance can be configured directly on the dashboard, the following advanced options provide even greater control through the modalConfig property.

modalConfig

The modalConfig option in the constructor lets you configure the modal UI and customize authentication:

modalConfig?: ConnectorsModalConfig;

export interface ConnectorsModalConfig {
connectors?: Partial<Record<WALLET_CONNECTOR_TYPE, ModalConfig>>;
hideWalletDiscovery?: boolean;
}

export type WALLET_CONNECTOR_TYPE = (typeof WALLET_CONNECTORS)[keyof typeof WALLET_CONNECTORS];

export interface ModalConfig extends Omit<BaseConnectorConfig, "isInjected" | "chainNamespaces"> {
loginMethods?: LoginMethodConfig;
}

LoginMethodConfig

The LoginMethodConfig interface provides extensive customization options for each authentication method:

PropertyTypeDescription
namestringCustom display name (defaults to auth app's default if not provided)
descriptionstringButton description (renders as full-length button if provided; otherwise as an icon)
logoHoverstringLogo shown on mouse hover (defaults to auth app's default)
logoLightstringLogo for dark theme/background (defaults to auth app's default)
logoDarkstringLogo for light theme/background (defaults to auth app's default)
mainOptionbooleanWhether to show login button on the main list
showOnModalbooleanControls visibility of the login button on modal
authConnectionIdstringAuth connection ID of the provider
groupedAuthConnectionIdstringGrouped auth connection ID of the provider
extraLoginOptionsExtraLoginOptionsAdditional parameters for social login
authConnectionAUTH_CONNECTION_TYPEAuth connection type (useful for customizing login buttons with custom connectors)
isDefaultbooleanWhether it's the default connector (internal)

Common Customization Examples

Disabling Specific Social Login Methods

Web3Auth provides the following social login methods:

export declare const AUTH_CONNECTION: {
readonly GOOGLE: "google";
readonly TWITTER: "twitter";
readonly FACEBOOK: "facebook";
readonly DISCORD: "discord";
readonly FARCASTER: "farcaster";
readonly APPLE: "apple";
readonly GITHUB: "github";
readonly REDDIT: "reddit";
readonly LINE: "line";
readonly KAKAO: "kakao";
readonly LINKEDIN: "linkedin";
readonly TWITCH: "twitch";
readonly TELEGRAM: "telegram";
readonly WECHAT: "wechat";
readonly EMAIL_PASSWORDLESS: "email_passwordless";
readonly SMS_PASSWORDLESS: "sms_passwordless";
readonly CUSTOM: "custom";
readonly PASSKEYS: "passkeys";
readonly AUTHENTICATOR: "authenticator";
};

To disable specific login methods, set showOnModal to false for the corresponding auth connection:

import { Web3Auth, WALLET_CONNECTORS, WEB3AUTH_NETWORK } from "@web3auth/modal";

const web3auth = new Web3Auth({
clientId: "YOUR_CLIENT_ID",
web3AuthNetwork: WEB3AUTH_NETWORK.SAPPHIRE_MAINNET,
modalConfig: {
connectors: {
[WALLET_CONNECTORS.AUTH]: {
label: "auth",
loginMethods: {
// Disable Facebook and Reddit
facebook: {
name: "facebook",
showOnModal: false,
},
reddit: {
name: "reddit",
showOnModal: false,
},
},
// Setting to false will hide all social login methods from modal
showOnModal: true,
},
},
},
});

// Initialize web3auth
await web3auth.init();

Enhancing Email and SMS Login Experience

By specifying a custom authConnectionId for email or SMS login methods, you can ensure the entire authentication flow takes place seamlessly within the modal, eliminating the need for external popups.

info

In the default setup, users are redirected to a separate popup to enter their email or phone number for security purposes. However, with a custom authConnectionId, this input step is securely embedded directly inside the modal, providing a smoother and more integrated user experience.

import { Web3Auth, WALLET_CONNECTORS, WEB3AUTH_NETWORK } from "@web3auth/modal";

const web3auth = new Web3Auth({
clientId: "YOUR_CLIENT_ID",
web3AuthNetwork: WEB3AUTH_NETWORK.SAPPHIRE_MAINNET,
modalConfig: {
connectors: {
[WALLET_CONNECTORS.AUTH]: {
label: "auth",
loginMethods: {
email_passwordless: {
name: "email passwordless login",
authConnectionId: "w3a-email_passwordless-demo",
},
sms_passwordless: {
name: "sms passwordless login",
authConnectionId: "w3a-sms_passwordless-demo",
},
},
},
},
},
});

// Initialize web3auth
await web3auth.init();

Creating a Fully Custom UI

For complete control over the authentication interface, you can bypass the Web3Auth modal entirely and use the connectTo function. This allows you to create custom buttons that connect directly to specific auth providers.

See the Custom Authentication section for detailed implementation instructions.