> ## Documentation Index
> Fetch the complete documentation index at: https://docs-dev-docs-event-stream-action-templates.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# LoginPassword

> Describes all the properties and methods available to customize the Universal Login `login-password` screen.

The LoginPassword class implements the `login-password` screen functionality. This screen collects the user's identifier and password.

<Frame>
  <img style={{maxHeight:"400px"}} src="https://mintcdn.com/docs-dev-docs-event-stream-action-templates/RjB12i6aOVmBONJv/docs/images/cdy7uua7fh8z/Em8VqaD4fPUx6FRevD8fh/a9133a19565d5d9ddc1454535a0a7a11/loginpassword.png?fit=max&auto=format&n=RjB12i6aOVmBONJv&q=85&s=d3a194b799ad97a02a3106ca736fcfe0" alt="" width="480" height="852" data-path="docs/images/cdy7uua7fh8z/Em8VqaD4fPUx6FRevD8fh/a9133a19565d5d9ddc1454535a0a7a11/loginpassword.png" />
</Frame>

## Constructors

Create an instance of LoginPassword screen manager:

```typescript Example theme={null}
import LoginPassword from "@auth0/auth0-acul-js/login-password";
const loginPasswordManager = new LoginPassword();
loginPasswordManager.login({
  username: "testUser",
  password: "testPassword"
});
```

## Properties

<ParamField body="branding" type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/BrandingMembers">BrandingMembers</a></span>}>
  Provides branding-related configurations, such as branding theme and settings.
</ParamField>

<ParamField body="client" type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/ClientMembers">ClientMembers</a></span>}>
  Provides client-related configurations, such as `id`, `name`, and `logoUrl`, for the `login-password` screen.
</ParamField>

<ParamField body="organization" type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/OrganizationMembers">OrganizationMembers</a></span>}>
  Provides information about the user's Organization, such as `id` and `name`.
</ParamField>

<ParamField body="prompt" type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/PromptMembers">PromptMembers</a></span>}>
  Contains data about the current prompt in the authentication flow.
</ParamField>

<ParamField body="screen" type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/ScreenMembersOnLoginPassword">ScreenMembersOnLoginPassword</a></span>}>
  Contains details specific to the `login-password` screen, including its configuration and context.
</ParamField>

<ParamField body="tenant" type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/TenantMembers">TenantMembers</a></span>}>
  Contains data related to the tenant, such as `id` and associated metadata.
</ParamField>

<ParamField body="transaction" type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/TransactionMembersOnLoginPassword">TransactionMembersOnLoginPassword</a></span>}>
  Provides transaction-specific data for the `login-password` screen, such as active identifiers and flow states.
</ParamField>

<ParamField body="untrustedData" type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/UntrustedDataMembers">UntrustedDataMembers</a></span>}>
  Handles untrusted data passed to the SDK, such as user input during login.
</ParamField>

<ParamField body="user" type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/UserMembers">UserMembers</a></span>}>
  Details of the active user, including `username`, `email`, and `roles`.
</ParamField>

## Methods

<ParamField body="changeLanguage" type="Promise<void>">
  This method changes the display language of the Universal Login page.

  ```typescript Example theme={null}
  import LoginPassword from "@auth0/auth0-acul-js/login-password";
  const loginPasswordManager = new LoginPassword();
  loginPasswordManager.changeLanguage({
    language: 'fr',
  });
  ```

  **Method Parameters**

  <Expandable title="Parameters">
    <ParamField body="options">
      [LanguageChangeOptions](/docs/libraries/acul/js-sdk/Screens/interfaces/LanguageChangeOptions).
    </ParamField>

    <ParamField body="language" type="string" required>
      The locale code for the desired language (for example, `'en'`, `'fr'`, `'es'`).
    </ParamField>

    <ParamField body="persist?" type="&#x22;session&#x22;">
      When set to `'session'`, the selected language persists for the duration of the session.
    </ParamField>

    <ParamField body="[`key`: `string`]" type="&#x22;string&#x22; | &#x22;number&#x22; | &#x22;boolean&#x22; | &#x22;undefined&#x22;">
      Additional custom fields prefixed with `ulp-` (for example, `'ulp-custom-field'`).
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="federatedLogin" type="Promise<void>">
  This method redirects the user to the social or enterprise identity provider (IdP) for authentication.

  ```typescript Example theme={null}
  import LoginPassword from "@auth0/auth0-acul-js/login-password";
  const loginPasswordManager = new LoginPassword();
  loginPasswordManager.federatedLogin({
    connection: "google-oauth2"
  });
  ```

  **Method Parameters**

  <Expandable title="Parameters">
    <ParamField body="options">
      [FederatedLoginPayloadOptions](/docs/libraries/acul/js-sdk/Screens/interfaces/FederatedLoginPayloadOptions).
    </ParamField>

    <ParamField body="connection" type="string" required>
      The social connection name to use.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="getErrors" type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/Error">Error</a>[]</span>}>
  This method retrieves the array of transaction errors from the context, or an empty array if none exist. An array of error objects from the transaction context.
</ParamField>

<ParamField body="login" type="Promise<void>">
  This method authenticates the user based on the identifier and provided password.

  ```typescript Example theme={null}
  import LoginPassword from "@auth0/auth0-acul-js/login-password";
  const loginPasswordManager = new LoginPassword();
  loginPasswordManager.login({
    username: "testUser",
    password: "testPassword"
  });
  ```

  **Method Parameters**

  <Expandable title="Parameters">
    <ParamField body="options">
      [LoginPayloadOptions](/docs/libraries/acul/js-sdk/Screens/interfaces/LoginPayloadOptions).
    </ParamField>

    <ParamField body="username" type="string" required>
      The user's identifier.
    </ParamField>

    <ParamField body="password" type="string" required>
      The user's password.
    </ParamField>

    <ParamField body="captcha?" type="string">
      The captcha code or response from the captcha provider. This property is required if your Auth0 tenant has [Bot Detection](/docs/secure/attack-protection/bot-detection) enabled.
    </ParamField>

    <ParamField body="[`key`: `string`]" type="&#x22;string&#x22; | &#x22;number&#x22; | &#x22;boolean&#x22; | &#x22;undefined&#x22;">
      Additional custom fields prefixed with `ulp-` (for example, `'ulp-custom-field'`).
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="switchConnection" type="Promise<void>">
  This method switches between a database connection (password) and a passwordless connection (Email/SMS OTP).

  ```typescript Example theme={null}
  import LoginPassword from "@auth0/auth0-acul-js/login-password";
  const loginPasswordManager = new LoginPassword();
  loginPasswordManager.switchConnection({
    connection: "email"
  });
  ```

  **Method Parameters**

  <Expandable title="Parameters">
    <ParamField body="options">
      [SwitchConnectionOptionsLoginPassword](/docs/libraries/acul/js-sdk/Screens/interfaces/SwitchConnectionOptionsLoginPassword).
    </ParamField>

    <ParamField body="connection" type="string" required>
      The connection name to switch to. Use `'email'` or `'sms'` for passwordless, or a DB connection name for password-based authentication.
    </ParamField>

    <ParamField body="[`key`: `string`]" type="&#x22;string&#x22; | &#x22;number&#x22; | &#x22;boolean&#x22;">
      Additional custom fields prefixed with `ulp-` (for example, `'ulp-custom-field'`).
    </ParamField>
  </Expandable>
</ParamField>
