> ## Documentation Index
> Fetch the complete documentation index at: https://docs-staging-actions-triggers-prototype.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> Altering the appearance and behavior of Lock.Android

# Lock.Android: Configuration

You can use the options below to configure functions and design for Lock for Android.

Configurations options are added to the Lock Builder using the following format:

```kotlin lines theme={null}
val lock = Lock.newBuilder(account, callback)
    // Configuration options
    .closable(true)
    .allowSignUp(false)
    .setPrivacyURL('http://example.com/privacy')
    .setTermsURL('http://example.com/terms')
    // End configuration options
    .build(this)
```

## General options

* **closable(boolean)**: Defines if the LockActivity can be closed. By default, it's not closable.
* **allowedConnections(List)**: Filters the allowed connections from the list configured in the Dashboard. By default if this value is empty, all the connections defined in the dashboard will be available.
* **hideMainScreenTitle(boolean)**: If set to `true`, the header on the main screen won't display the title.

## Authentication options

* **withAuthenticationParameters(Map\<String, Object>)**: Defines extra authentication parameters to be sent on each log-in and sign-up call. The default `scope` used on authentication calls is `openid`. If you want to specify a different one, use `withAuthenticationParameters` and add a different value for the `scope` key.
* **withScope(String)**: Changes the scope requested when performing an authentication request.
* **withAudience(String)**: Changes the <Tooltip tip="Audience: Unique identifier of the audience for an issued token. Named aud in a token, its value contains the ID of either an application (Client ID) for an ID Token or an API (API Identifier) for an Access Token." cta="View Glossary" href="/docs/glossary?term=audience">audience</Tooltip> requested when performing an authentication request.

## Database options

* **withUsernameStyle(int)**: Defines if it should ask for email only, username only, or both of them. The accepted values are `USERNAME` and `EMAIL`. By default, it will respect the Dashboard configuration of the parameter `requires_username`.
* **loginAfterSignUp(boolean)**: Whether after a `SignUp` event the user should be logged in automatically. Defaults to `true`.
* **initialScreen(int)**: Allows to customize which form will first appear when launching Lock. The accepted values are `LOG_IN`, `SIGN_UP`, and `FORGOT_PASSWORD`. By default `LOG_IN` is the initial screen.
* **allowSignUp(boolean)**: Shows the signup form if a Database connection is configured and it's allowed from the Dashboard. Defaults to `true`.
* **allowLogIn(boolean)**: Shows the login form if a Database connection is configured. Defaults to `true`.
* **allowForgotPassword(boolean)**: This shows the Forgot Password form if a Database connection is configured and it's allowed from the Dashboard. Defaults to `true`.
* **allowShowPassword(boolean)**: Shows a button to toggle the input visibility of a Password field. Defaults to `true`.
* **setDefaultDatabaseConnection(String)**: Defines which will be the default Database connection. This is useful if your application has many Database connections configured.
* **enableEnterpriseWebAuthenticationFor(List)**: Filters the enterprise connections that will launch a web authentication flow via the browser when clicked. Only 'ad', 'adfs', or 'waad' strategies are allowed.
* **withSignUpFields(List)**: Shows a second screen with extra fields for the user to complete after the username/email and password were completed in the sign-up screen. Values submitted this way can be stored in the user profile using either a root attribute or the `user_metadata` attribute. For more info, see [Lock Android: Custom Fields at Signup](/docs/libraries/lock-android/lock-android-custom-fields-at-signup).
* **setPrivacyURL(String)**: Allows to customize the Privacy Policy URL. Defaults to `https://auth0.com/privacy`.
* **setTermsURL(String)**: Allows to customize the Terms of Service URL. Defaults to `https://auth0.com/terms`.
* **setSupportURL(String)**: Allows to set a Support URL that will be displayed in case that a non-recoverable error raises on Lock.
* **setMustAcceptTerms(boolean)**: Forces the user to accept the Terms\&Policy before signing up. Defaults to `false`.
* **useLabeledSubmitButton(boolean)**: If set to `true`, it will display a label of the current mode (sign up/ log in) in the submit button instead of an icon. Defaults to `true`. If the `hideMainScreenTitle` option is set to true this setting is ignored and a label will be used anyways.

## OAuth options

* **withAuthStyle(String, int)**: Customize the look and feel of a given connection (name) with a specific style. See [this document on custom oauth connections](/docs/libraries/lock-android/lock-android-custom-theming) for more information.
* **withConnectionScope(String, String...)**: Allows to specify additional scopes for a given Connection name, which will be requested along with the ones defined in the connection settings in the [Auth0 Dashboard](https://manage.auth0.com/#). The scopes are not validated in any way and need to be recognized by the given authentication provider. For a list, check the [Auth0 Dashboard](https://manage.auth0.com/#) under the settings for the connection in question.
* **withScheme(String)**: Allows to change the scheme of the `redirect_uri` sent on the authorize call. By default, the scheme is `https`. If this setting is changed, the manifest placeholder for the `auth0Scheme` and the "Allowed Callbacks URLs" on the Auth0 application dashboard must be updated too.

## Passwordless options

* **useCode()**: Send a code instead of a link via email/SMS for <Tooltip tip="Passwordless: Form of authentication that does not rely on a password as the first factor." cta="View Glossary" href="/docs/glossary?term=Passwordless">Passwordless</Tooltip> authentication.
* **useLink()**: Send a link instead of a code via email/SMS for Passwordless authentication.
* **rememberLastLogin(boolean)**: Whether the email or phone used in the last successful authentication will be saved to auto-login the next time a Passwordless authentication is requested.
