> ## 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.

# Login

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

The Login class implements the `login` screen functionality. This screen collects the user's identifier and password. Depending on your tenant, this identifer can be an email, phone number, or username.

<Frame>
  <img style={{maxHeight:"400px"}} src="https://mintcdn.com/docs-dev-docs-event-stream-action-templates/tcenw4jcNpftRqWN/docs/images/cdy7uua7fh8z/5be9XfnulShqeXa4MXfXky/f3a5dded3539d4d683a525dfb6ad8042/Screenshot_2025-01-28_at_10.49.07.png?fit=max&auto=format&n=tcenw4jcNpftRqWN&q=85&s=9c0c725f00e9e48a14d677bcde423b2d" alt="ACUL Login" width="396" height="681" data-path="docs/images/cdy7uua7fh8z/5be9XfnulShqeXa4MXfXky/f3a5dded3539d4d683a525dfb6ad8042/Screenshot_2025-01-28_at_10.49.07.png" />
</Frame>

## Constructors

Create an instance of Login screen manager:

```typescript Example theme={null}
import Login from "@auth0/auth0-acul-js/login";
const loginManager = new Login();
loginManager.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` 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/ScreenMembersOnLogin">ScreenMembersOnLogin</a></span>}>
  Contains details specific to the `login` 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/TransactionMembersOnLogin">TransactionMembersOnLogin</a></span>}>
  Provides transaction-specific data for the `login` 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 Login from "@auth0/auth0-acul-js/login";
  const loginManager = new Login();
  loginManager.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 Login from "@auth0/auth0-acul-js/login";
  const loginManager = new Login();
  loginManager.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="getLoginIdentifiers" type={<span><a href="/docs/libraries/acul/js-sdk/Screens/type-aliases/ScreenIdentifierType">ScreenIdentifierType</a>[] | null</span>}>
  This method returns the active identifier types for the `login` screen.

  ```typescript Example theme={null}
  import Login from "@auth0/auth0-acul-js/login";
  const loginManager = new Login();
  loginManager.getLoginIdentifiers();
  ```
</ParamField>

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

  ```typescript Example theme={null}
  import Login from "@auth0/auth0-acul-js/login";
  const loginManager = new Login();
  loginManager.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="pickCountryCode" type="Promise<void>">
  This method redirects the user to the country code selection list, where they can update the country code prefix for their phone number.

  ```typescript Example theme={null}
  import Login from "@auth0/auth0-acul-js/login";
  const loginManager = new Login();
  loginManager.pickCountryCode();
  ```

  **Method Parameters**

  <Expandable title="Parameters">
    <ParamField body="options">
      [CustomOptions](/docs/libraries/acul/js-sdk/Screens/interfaces/CustomOptions).
    </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>
