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

# LoginId

> Universal Login の `login-id` 画面をカスタマイズするために利用できる、すべてのプロパティとメソッドについて説明します。

LoginId クラスは、`login-id` 画面の機能を実装します。この画面では、identifier 優先の認証フローの最初のステップとしてユーザーの identifier を収集します。テナントによっては、この identifier としてメールアドレス、電話番号、またはユーザー名を使用できます。パスキーログイン、フェデレーテッド ID プロバイダー、Google One Tap もサポートしています。

<Frame>
  <img style={{maxHeight:"400px"}} src="https://mintcdn.com/translations/eVsQcTnbClN-oB7d/docs/images/cdy7uua7fh8z/1nvMFmxC5ODCW2q7cByHv8/657d87ba1c2eb11316e6b0ef93737c99/LoginIDACUL.png?fit=max&auto=format&n=eVsQcTnbClN-oB7d&q=85&s=02a1a0bc7dfacd594a37b6a48356de00" alt="" width="409" height="562" data-path="docs/images/cdy7uua7fh8z/1nvMFmxC5ODCW2q7cByHv8/657d87ba1c2eb11316e6b0ef93737c99/LoginIDACUL.png" />
</Frame>

<div id="constructors">
  ## コンストラクタ
</div>

LoginId 画面マネージャーのインスタンスを作成します:

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

<div id="properties">
  ## プロパティ
</div>

<ParamField body="branding" type={<span><a href="/docs/ja-jp/libraries/acul/js-sdk/Screens/interfaces/BrandingMembers">BrandingMembers</a></span>}>
  ブランディングテーマや設定など、ブランディングに関連する設定を提供します。
</ParamField>

<ParamField body="client" type={<span><a href="/docs/ja-jp/libraries/acul/js-sdk/Screens/interfaces/ClientMembers">ClientMembers</a></span>}>
  `login-id` 画面向けに、`id`、`name`、`logoUrl` などのクライアント関連の設定を提供します。
</ParamField>

<ParamField body="organization" type={<span><a href="/docs/ja-jp/libraries/acul/js-sdk/Screens/interfaces/OrganizationMembers">OrganizationMembers</a></span>}>
  ユーザーの組織に関する情報 (`id` や `name` など) を提供します。
</ParamField>

<ParamField body="prompt" type={<span><a href="/docs/ja-jp/libraries/acul/js-sdk/Screens/interfaces/PromptMembers">PromptMembers</a></span>}>
  認証フローにおける現在の prompt に関するデータを含みます。
</ParamField>

<ParamField body="screen" type={<span><a href="/docs/ja-jp/libraries/acul/js-sdk/Screens/interfaces/ScreenMembersOnLoginId">ScreenMembersOnLoginId</a></span>}>
  設定やコンテキストを含む、`login-id` 画面固有の詳細を含みます。
</ParamField>

<ParamField body="tenant" type={<span><a href="/docs/ja-jp/libraries/acul/js-sdk/Screens/interfaces/TenantMembers">TenantMembers</a></span>}>
  `id` や関連するメタデータなど、テナント に関連するデータを含みます。
</ParamField>

<ParamField body="transaction" type={<span><a href="/docs/ja-jp/libraries/acul/js-sdk/Screens/interfaces/TransactionMembersOnLoginId">TransactionMembersOnLoginId</a></span>}>
  アクティブな identifier やフローの状態など、`login-id` 画面に固有のトランザクション データを提供します。
</ParamField>

<ParamField body="untrustedData" type={<span><a href="/docs/ja-jp/libraries/acul/js-sdk/Screens/interfaces/UntrustedDataMembers">UntrustedDataMembers</a></span>}>
  ログイン時のユーザー入力など、SDK に渡される信頼されていないデータを扱います。
</ParamField>

<ParamField body="user" type={<span><a href="/docs/ja-jp/libraries/acul/js-sdk/Screens/interfaces/UserMembers">UserMembers</a></span>}>
  アクティブなユーザーの詳細 (`username`、`email`、`roles` など) を含みます。
</ParamField>

<div id="methods">
  ## メソッド
</div>

<ParamField body="changeLanguage" type="Promise<void>">
  このメソッドは、Universal Login ページの表示言語を変更します。

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

  **メソッドのパラメータ**

  <Expandable title="パラメータ">
    <ParamField body="options">
      [LanguageChangeOptions](/docs/ja-jp/libraries/acul/js-sdk/Screens/interfaces/LanguageChangeOptions)。
    </ParamField>

    <ParamField body="language" type="string" required>
      変更先の言語のロケールコードです (例: `'en'`、`'fr'`、`'es'`) 。
    </ParamField>

    <ParamField body="persist?" type="&#x22;session&#x22;">
      `'session'` に設定すると、選択した言語はセッション中保持されます。
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="federatedLogin" type="Promise<void>">
  このメソッドは、認証のためにユーザーを[ソーシャル](/docs/ja-jp/authenticate/identity-providers/social-identity-providers)または[エンタープライズのアイデンティティプロバイダー](/docs/ja-jp/authenticate/identity-providers/enterprise-identity-providers) (IdP) にリダイレクトします。

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

  **メソッドのパラメータ**

  <Expandable title="パラメータ">
    <ParamField body="connection" type="string" required>
      ソーシャルまたはエンタープライズのアイデンティティプロバイダーの接続名です。
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="getErrors" type={<span><a href="/docs/ja-jp/libraries/acul/js-sdk/Screens/interfaces/Error">Error</a>[]</span>}>
  このメソッドは、コンテキストからトランザクションのエラー配列を取得します。存在しない場合は空の配列を返します。トランザクションのコンテキストに含まれるエラーオブジェクトの配列です。
</ParamField>

<ParamField body="getLoginIdentifiers" type={<span><a href="/docs/ja-jp/libraries/acul/js-sdk/Screens/type-aliases/ScreenIdentifierType">ScreenIdentifierType</a>[] | null</span>}>
  このメソッドは、login-id 画面で有効になっている identifier タイプを取得します。

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

<ParamField body="login" type="Promise<void>">
  このメソッドは、ユーザーにユーザー名の入力を求めます。

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

  **メソッドのパラメータ**

  <Expandable title="パラメータ">
    <ParamField body="options">
      [LoginOptions](/docs/ja-jp/libraries/acul/js-sdk/Screens/interfaces/LoginOptions)。
    </ParamField>

    <ParamField body="username" type="string" required>
      ユーザーの identifier です。
    </ParamField>

    <ParamField body="captcha?" type="string">
      captcha の code、または CAPTCHA provider からのレスポンスです。Auth0 テナントで [ボット検出](/docs/ja-jp/secure/attack-protection/bot-detection) が有効になっている場合、このプロパティは必須です。
    </ParamField>

    <ParamField body="[`key`: `string`]" type="&#x22;string&#x22; | &#x22;number&#x22; | &#x22;boolean&#x22; | &#x22;undefined&#x22;">
      `ulp-` で始まる追加のカスタムフィールドです (例: `'ulp-custom-field'`) 。
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="passkeyLogin" type="Promise<void>">
  このメソッドは、指定されたパスキーを使用してユーザーを認証し、成功すると `redirect_url` にリダイレクトします。

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

  **メソッドのパラメータ**

  <Expandable title="パラメータ">
    <ParamField body="options">
      [CustomOptions](/docs/ja-jp/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;">
      `ulp-` で始まる追加のカスタムフィールドです (例: `'ulp-custom-field'`) 。
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="googleOneTap" type="Promise<void>">
  このメソッドは Google One Tap 資格情報を使用してユーザーを認証し、別のログインページにリダイレクトせずにワンクリックでサインインできるようにします。

  Google One Tap プロンプトをレンダリングする前に `screen.googleOneTapConfig` を確認してください。この機能がサーバー側で有効になっていない場合、値は `null` です。

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

  **メソッド パラメータ**

  <Expandable title="パラメータ">
    <ParamField body="one_tap_credential" type="string" required>
      Google Identity Services プロンプトから返される Google One Tap 資格情報トークン。
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="pickCountryCode" type="Promise<void>">
  このメソッドはユーザーを国番号の選択リストにリダイレクトし、電話番号の国番号プレフィックスを更新できるようにします。

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

<ParamField body="registerPasskeyAutofill" type="Promise<void>">
  このメソッドは、`mediation: conditional` を指定した `navigator.credentials.get()` を使用して、受動的な WebAuthn 資格情報リクエストを初期化します。サポートされている場合、ブラウザーは保存済みのパスキーをユーザー名フィールドの autocomplete ドロップダウンに直接表示できます。

  ```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);
  ```

  **メソッド パラメータ**

  <Expandable title="パラメータ">
    <ParamField body="inputId?" type="string">
      ユーザー名 `<input>` 要素の省略可能な ID (`#` なし) 。例: `"username"`。省略した場合、入力要素に正しい `autocomplete` 属性が設定されていることを、開発者が手動で確認する必要があります。
    </ParamField>
  </Expandable>
</ParamField>
