> For the complete documentation index, see [llms.txt](/llms.txt).

# Advanced configuration

The Embedded Wallets SDK provides extensive configuration options that allow you to customize authentication flows, UI appearance, blockchain integrations, and security features to meet your application's specific requirements.

## Configuration structure[​](#configuration-structure "Direct link to Configuration structure")

When setting up Embedded Wallets, you'll pass in the options to the constructor. This consists of:

```
import com.web3auth.core.Web3Auth
import com.web3auth.core.types.Web3AuthOptions

var web3Auth = Web3Auth(
  Web3AuthOptions(
    context = this,
    clientId = "YOUR_WEB3AUTH_CLIENT_ID", // Pass your Web3Auth Client ID, ideally using an environment variable
    network = Network.MAINNET,
    redirectUrl = Uri.parse("{YOUR_APP_PACKAGE_NAME}://auth"),
  )
)

// Handle user signing in when app is in background
web3Auth.setResultUrl(intent?.data)

```

### `Web3AuthOptions`[​](#web3authoptions "Direct link to web3authoptions")

The Web3Auth Constructor takes an object with `Web3AuthOptions` as input.

- Basic Parameters
- Advanced Parameters
- Interface

| Parameter       | Description                                                                                                                                                                    |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| context         | Android context to launch web-based authentication, usually is the current activity. It's a mandatory field, and accepts android.content.Context as a value.                   |
| clientId        | Your Embedded Wallets Client ID. You can get it from Embedded Wallets [dashboard](https://developer.metamask.io/) under project details. It's a mandatory field of type String |
| network         | Defines the Embedded Wallets Network. It's a mandatory field of type Network.                                                                                                  |
| redirectUrl     | URL that Embedded Wallets will redirect API responses upon successful authentication from browser. It's a mandatory field of type Uri.                                         |
| sessionTime?    | Allows developers to configure the session management time. Session time is in seconds, default is 86400 seconds which is 1 day. sessionTime can be max 30 days.               |
| useCoreKitKey?  | Use CoreKit (or SFA) key to get core kit key given by SFA SDKs. It's an optional field with default value as false. Useful for Wallet Pregeneration.                           |
| chainNamespace? | Chain Namespace [EIP155 and SOLANA]. It takes ChainNamespace as a value.                                                                                                       |

| Parameter    | Description                                                                                                                                                |
| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| whiteLabel?  | Whitelabel options for Embedded Wallets. It helps you define custom UI, branding, and translations for your brand app. It takes WhiteLabelData as a value. |
| loginConfig? | Login config for the custom verifiers. It takes HashMap<String, LoginConfigItem> as a value.                                                               |
| mfaSettings? | Allows developers to configure the MFA settings for authentication. It takes MfaSettings as a value.                                                       |

```
data class Web3AuthOptions(
    var context: Context,
    val clientId: String,
    val network: Network,
    var buildEnv: BuildEnv? = BuildEnv.PRODUCTION,
    @Transient var redirectUrl: Uri,
    var sdkUrl: String = getSdkUrl(buildEnv),
    val whiteLabel: WhiteLabelData? = null,
    val loginConfig: HashMap<String, LoginConfigItem>? = null,
    val useCoreKitKey: Boolean? = false,
    val chainNamespace: ChainNamespace? = ChainNamespace.EIP155,
    val mfaSettings: MfaSettings? = null,
    val sessionTime: Int? = 86400
)

```

## Session management[​](#session-management "Direct link to Session management")

Control how long users stay authenticated and how sessions persist. The session key is stored in the device's encrypted Keystore.

**Key Configuration Options:**

- `sessionTime` - Session duration in seconds. Controls how long users remain authenticated before needing to log in again.  
  - Minimum: 1 second (`1`).
  - Maximum: 30 days (`86400 * 30`).
  - Default: 7 days (`86400 * 7`).

```
var web3Auth = Web3Auth(
  Web3AuthOptions(
    context = this,
    clientId = "YOUR_WEB3AUTH_CLIENT_ID", // Pass your Web3Auth Client ID, ideally using an environment variable
    network = Network.MAINNET,
    sessionTime = 86400 * 7, // 7 days (in seconds)
    redirectUrl = Uri.parse("{YOUR_APP_PACKAGE_NAME}://auth"),
  )
)

```

## Custom authentication methods[​](#custom-authentication-methods "Direct link to Custom authentication methods")

Control the login options presented to your users. For detailed configuration options and implementation examples, see the [custom authentication](/embedded-wallets/sdk/android/advanced/custom-authentication/) section.

## UI customization[​](#ui-customization "Direct link to UI customization")

Create a seamless brand experience by customizing the Embedded Wallets login screens to match your application's design. For complete customization options, refer to the [Whitelabeling & UI Customization](/embedded-wallets/sdk/android/advanced/whitelabel/) section.

## Multi-Factor Authentication[​](#multi-factor-authentication "Direct link to Multi-Factor Authentication")

Add additional security layers to protect user accounts with two-factor authentication. For detailed configuration options and implementation examples, see the [Multi-Factor Authentication](/embedded-wallets/sdk/android/advanced/mfa/) section.

**Key Configuration Options:**

- `mfaSettings` - Configure MFA settings for different authentication flows
- `mfaLevel` - Control when users are prompted to set up MFA
