Skip to main content

Whitelabel PnP Android SDK

For defining custom UI, branding, and translations for your brand, you just need to specify an additional parameter within the Web3AuthOptions object called whiteLabel. This parameter takes object called WhiteLabelData.

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 the development environment for free.

Arguments

WhiteLabelData

ParameterDescription
appName?Display name for the app in the UI.
logoLight?App logo to be used in dark mode. It accepts url in String as a value.
logoDark?App logo to be used in light mode. It accepts url in String as a value.
defaultLanguage?Language which will be used by Web3Auth, app will use browser language if not specified. Default language is Language.EN. Checkout Language for supported languages.
mode?Theme mode for the login modal. Choose between ThemeModes.AUTO, ThemeModes.LIGHT or ThemeModes.DARK background modes. Default value is ThemeModes.AUTO.
theme?Used to customize the theme of the login modal. It accepts HashMap as a value.
appUrl?Url to be used in the Modal. It accepts url in String as a value.
useLogoLoader?Use logo loader. If logoDark and logoLight are null, the default Web3Auth logo will be used for the loader. Default value is false.

name

The name of the application. This will be displayed in the key reconstruction page.

Standard screen without any change

Standard screen without any change

Name changed to Formidable Duo

Name changed to Formidable Duo

logoLight & logoDark

The logo of the application. Displayed in dark and light mode respectively. This will be displayed in the key reconstruction page.

logoLight on dark mode

logoLight on dark mode

logoDark on light mode

logoDark on light mode

defaultLanguage

Default language will set the language used on all OpenLogin screens. The supported languages are:

  • en - English (default)

  • de - German

  • ja - Japanese

  • ko - Korean

  • zh - Mandarin

  • es - Spanish

  • fr - French

  • pt - Portuguese

  • nl - Dutch

default Language screen

dark

Can be set to true or false with default set to false.


For Light: dark: false

light theme

For Dark: dark: true

dark theme

theme

Theme is a record of colors that can be configured. As of, now only primary color can be set and has effect on OpenLogin screens (default primary color is #0364FF). Theme affects icons and links. Examples below.

Standard color #0364FF

Theme is a record of colors that can be configured.

Color changed to #D72F7A

Theme affects icons and links.

Example

Usage
web3Auth = Web3Auth (
Web3AuthOptions (
context = this,
clientId = getString (R.string.web3auth_project_id),
network = Network.MAINNET,
redirectUrl = Uri.parse ("{YOUR_APP_PACKAGE_NAME}://auth"),
// Optional whitelabel object
whiteLabel = WhiteLabelData (
appName = "Web3Auth Sample App",
appUrl = null,
logoLight = null,
logoDark = null,
defaultLanguage = Language.EN, // EN, DE, JA, KO, ZH, ES, FR, PT, NL
ThemeModes = ThemeModes.DARK, // LIGHT, DARK, AUTO
useLogoLoader = true,
theme = hashMapOf (
"primary" to "#229954"
)
)
)
)