> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# LoginId

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

The LoginId class implements the `login-id` screen functionality. This screen collects the user's identifier as the first step of an identifier-first authentication flow. Depending on your tenant, this identifier can be an email, phone number, or username. It also supports passkey login, Federated Identity Providers, and Google One Tap.

![](https://mintlify.s3.us-west-1.amazonaws.com/docs-dev/images/cdy7uua7fh8z/1nvMFmxC5ODCW2q7cByHv8/657d87ba1c2eb11316e6b0ef93737c99/LoginIDACUL.png)

## Constructors

Create an instance of LoginId screen manager:

```typescript Example theme={null}
import LoginId from "@auth0/auth0-acul-js/login-id";
const loginIdManager = new LoginId();
loginIdManager.getLoginIdentifiers();
```

## Properties

**branding** `[BrandingMembers](/docs/libraries/acul/js-sdk/Screens/interfaces/BrandingMembers)`

Provides branding-related configurations, such as branding theme and settings.

**client** `[ClientMembers](/docs/libraries/acul/js-sdk/Screens/interfaces/ClientMembers)`

Provides client-related configurations, such as `id`, `name`, and `logoUrl`, for the `login-id` screen.

**countryCodes** `[CountryCodesMembers](/docs/libraries/acul/js-sdk/Screens/interfaces/CountryCodesMembers)`

Provides country code data for phone number entry, such as `available` and `recommended`, for the `login-id` screen.

**experiment** `[ExperimentMembers](/docs/libraries/acul/js-sdk/Screens/interfaces/ExperimentMembers)`

The active [Experiment Center](/docs/docs/customize/experiment-center) experiment for this screen, or `null` when no experiment is active (or the screen has not opted in via `context_configuration`).

**organization** `[OrganizationMembers](/docs/libraries/acul/js-sdk/Screens/interfaces/OrganizationMembers)`

Provides information about the user's Organization, such as `id` and `name`.

**prompt** `[PromptMembers](/docs/libraries/acul/js-sdk/Screens/interfaces/PromptMembers)`

Contains data about the current prompt in the authentication flow.

**screen** `[ScreenMembersOnLoginId](/docs/libraries/acul/js-sdk/Screens/interfaces/ScreenMembersOnLoginId)`

Contains details specific to the `login-id` screen, including its configuration and context.

**tenant** `[TenantMembers](/docs/libraries/acul/js-sdk/Screens/interfaces/TenantMembers)`

Contains data related to the tenant, such as `id` and associated metadata.

**transaction** `[TransactionMembersOnLoginId](/docs/libraries/acul/js-sdk/Screens/interfaces/TransactionMembersOnLoginId)`

Provides transaction-specific data for the `login-id` screen, such as active identifiers and flow states.

**untrustedData** `[UntrustedDataMembers](/docs/libraries/acul/js-sdk/Screens/interfaces/UntrustedDataMembers)`

Handles untrusted data passed to the SDK, such as user input during login.

**user** `[UserMembers](/docs/libraries/acul/js-sdk/Screens/interfaces/UserMembers)`

Details of the active user, including `username`, `email`, and `roles`.

## Methods

**changeLanguage** `Promise\<void\>`

This method changes the display language of the Universal Login page.

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

**Method Parameters**

**Parameters**

**options**

[LanguageChangeOptions](/docs/docs/libraries/acul/js-sdk/Screens/interfaces/LanguageChangeOptions).

**language** `string` *required*

The locale code for the desired language (for example, `'en'`, `'fr'`, `'es'`).

**persist?** `"session"`

When set to `'session'`, the selected language persists for the duration of the session.

**federatedLogin** `Promise\<void\>`

This method redirects the user to the [Social](/docs/docs/authenticate/identity-providers/social-identity-providers) or [Enterprise Identity Provider](/docs/docs/authenticate/identity-providers/enterprise-identity-providers) (IdP) for authentication.

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

**Method Parameters**

**Parameters**

**connection** `string` *required*

The Social or Enterprise Identity Provider connection name.

**\[`key`: `string`]** `"string" | "number" | "boolean" | "undefined"`

Additional custom fields prefixed with `ulp-` (for example, `'ulp-custom-field'`).

**getErrors** `[Error](/docs/libraries/acul/js-sdk/Screens/interfaces/Error)[]`

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.

**getLoginIdentifiers** `[ScreenIdentifierType](/docs/libraries/acul/js-sdk/Screens/type-aliases/ScreenIdentifierType)[] | null`

This method gets the active identifier types for the login-id screen.

```typescript Example theme={null}
import LoginId from "@auth0/auth0-acul-js/login-id";
const loginIdManager = new LoginId();
loginIdManager.getLoginIdentifiers();
```

**login** `Promise\<void\>`

This method prompts the user to provide their username.

```typescript Example theme={null}
import LoginId from "@auth0/auth0-acul-js/login-id";
const loginIdManager = new LoginId();
loginIdManager.login({
  username: "testUser"
});
```

**Method Parameters**

**Parameters**

**options**

[LoginOptions](/docs/docs/libraries/acul/js-sdk/Screens/interfaces/LoginOptions).

**identifier?** `string`

The user's identifier — email, username, or phone, depending on `identifierType`. Provide this or `username`; if both are given, `identifier` wins.

**username?** `string`

The user's identifier, under its original spelling. Provide this or `identifier`.

**identifierType?** `[IdentifierType](/docs/libraries/acul/js-sdk/Screens/type-aliases/IdentifierType)`

What `identifier` (or `username`) holds. Typically read from `screen.data.activeIdentifierType`. Omit to submit the identifier untyped.

**phoneCountryCode?** `string`

The ISO 3166-1 alpha-2 country for a phone identifier, from a `code` in `countryCodes.available`. Required when `identifierType` is `phone`. Pass the national number — the dial code is prefixed server-side.

**captcha?** `string`

The captcha code or response from the captcha provider. This property is required if your Auth0 tenant has [Bot Detection](/docs/docs/secure/attack-protection/bot-detection) enabled.

**\[`key`: `string`]** `"string" | "number" | "boolean" | "undefined"`

Additional custom fields prefixed with `ulp-` (for example, `'ulp-custom-field'`).

**passkeyLogin** `Promise\<void\>`

This method authenticates the user using the provided passkey and, if successful, redirects them to the `redirect_url`.

```typescript Example theme={null}
import LoginId from "@auth0/auth0-acul-js/login-id";
const loginIdManager = new LoginId();
loginIdManager.passkeyLogin();
```

**Method Parameters**

**Parameters**

**options**

[CustomOptions](/docs/docs/libraries/acul/js-sdk/Screens/interfaces/CustomOptions).

**\[`key`: `string`]** `"string" | "number" | "boolean" | "undefined"`

Additional custom fields prefixed with `ulp-` (for example, `'ulp-custom-field'`).

**googleOneTap** `Promise\<void\>`

This method authenticates the user using a Google One Tap credential, enabling one-click sign-in without redirecting to a separate login page.

Check `screen.googleOneTapConfig` before rendering the Google One Tap prompt — it is `null` when the feature is not enabled server-side.

```typescript Example theme={null}
import LoginId from "@auth0/auth0-acul-js/login-id";
const loginIdManager = new LoginId();
loginIdManager.googleOneTap({ one_tap_credential: credential });
```

**Method Parameters**

**Parameters**

**one\_tap\_credential** `string` *required*

The Google One Tap credential token returned by the Google Identity Services prompt.

**pickCountryCode** `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 LoginId from "@auth0/auth0-acul-js/login-id";
const loginIdManager = new LoginId();
loginIdManager.pickCountryCode();
```

**registerPasskeyAutofill** `Promise\<void\>`

This method initializes a passive WebAuthn credential request using `navigator.credentials.get()` with `mediation: conditional`. When supported, this allows the browser to display stored passkeys directly within the username field’s autocomplete dropdown.

```typescript Example theme={null}
import LoginId from '@auth0/auth0-acul-js/login-id';

async function initializeLogin() {
  const loginId = new LoginId();
  await loginId.registerPasskeyAutofill('username');
}

initializeLogin().catch(console.error);
```

**Method Parameters**

**Parameters**

**inputId?** `string`

Optional ID of the username `<input>` element (without `#`). Example: `"username"`. If omitted, the developer must manually ensure the correct `autocomplete` attributes are set on the input element.
