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

# Login

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

Login クラスは、`login` 画面の機能を実装します。この画面では、ユーザーの識別子とパスワードを入力します。テナントの設定によっては、この識別子としてメールアドレス、電話番号、またはユーザー名を使用できます。また、フェデレーテッド ID プロバイダーおよび Google One Tap による認証もサポートしています。

<Frame>
  <img style={{maxHeight:"400px"}} src="https://mintlify.s3.us-west-1.amazonaws.com/auth0-automated-translations-update/docs/images/cdy7uua7fh8z/5be9XfnulShqeXa4MXfXky/f3a5dded3539d4d683a525dfb6ad8042/Screenshot_2025-01-28_at_10.49.07.png" alt="ACUL Login" />
</Frame>

<h2 id="constructors">
  コンストラクター
</h2>

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

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

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

<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`、`name`、`logoUrl` などのクライアント関連の構成を提供します。
</ParamField>

<ParamField body="countryCodes" type={<span><a href="/docs/ja-jp/libraries/acul/js-sdk/Screens/interfaces/CountryCodesMembers">CountryCodesMembers</a></span>}>
  電話番号入力用の、`available` や `recommended` などの国コードデータを `login` 画面向けに提供します。
</ParamField>

<ParamField body="experiment" type={<span><a href="/docs/ja-jp/libraries/acul/js-sdk/Screens/interfaces/ExperimentMembers">ExperimentMembers</a></span>}>
  この画面で実行中の [Experiment Center](/docs/ja-jp/customize/experiment-center) の experiment です。アクティブな experiment がない場合 (または画面が `context_configuration` でオプトインしていない場合) は `null` になります。
</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>}>
  認証フローにおける現在のプロンプトに関するデータを含みます。
</ParamField>

<ParamField body="screen" type={<span><a href="/docs/ja-jp/libraries/acul/js-sdk/Screens/interfaces/ScreenMembersOnLogin">ScreenMembersOnLogin</a></span>}>
  設定やコンテキストを含む、`login` 画面固有の詳細を含みます。
</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/TransactionMembersOnLogin">TransactionMembersOnLogin</a></span>}>
  アクティブな識別子やフローの状態など、`login` 画面に関するトランザクション固有のデータを提供します。
</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>

<h2 id="methods">
  メソッド
</h2>

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

  ```typescript Example theme={null}
  import Login from "@auth0/auth0-acul-js/login";
  const loginManager = new Login();
  loginManager.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>">
  このメソッドは、認証のためにユーザーを [Social](/docs/ja-jp/authenticate/identity-providers/social-identity-providers) または [Enterprise Identity Provider](/docs/ja-jp/authenticate/identity-providers/enterprise-identity-providers) (IdP) にリダイレクトします。

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

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

  <Expandable title="パラメーター">
    <ParamField body="connection" type="string" required>
      Social または Enterprise Identity Provider の接続名。
    </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="getErrors" type={<span><a href="/docs/ja-jp/libraries/acul/js-sdk/Screens/interfaces/Error">Error</a>[]</span>}>
  このメソッドは、コンテキストから トランザクション のエラー配列を取得します。存在しない場合は空の配列を返します。トランザクション コンテキスト内の error object の配列です。
</ParamField>

<ParamField body="getLoginIdentifiers" type={<span><a href="/docs/ja-jp/libraries/acul/js-sdk/Screens/type-aliases/ScreenIdentifierType">ScreenIdentifierType</a>[] | null</span>}>
  このメソッドは、`login` 画面で有効な識別子タイプを返します。

  ```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>">
  このメソッドは、識別子と入力されたパスワードに基づいてユーザーを認証します。

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

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

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

    <ParamField body="identifier?" type="string">
      ユーザーの識別子です。`identifierType` に応じて、email、ユーザー名、または電話番号を指定します。これまたは `username` を指定してください。両方を指定した場合は、`identifier` が優先されます。
    </ParamField>

    <ParamField body="username?" type="string">
      元のスペルで指定するユーザー識別子です。これまたは `identifier` を指定してください。
    </ParamField>

    <ParamField body="identifierType?" type={<span><a href="/docs/ja-jp/libraries/acul/js-sdk/Screens/type-aliases/IdentifierType">IdentifierType</a></span>}>
      `identifier` (または `username`) に格納される値の種類です。通常は `screen.data.activeIdentifierType` から読み取ります。識別子を型指定なしで送信する場合は省略してください。
    </ParamField>

    <ParamField body="password" type="string" required>
      ユーザーのパスワードです。
    </ParamField>

    <ParamField body="phoneCountryCode?" type="string">
      電話番号識別子に使用する ISO 3166-1 alpha-2 国コードです。`countryCodes.available` の `code` から取得します。`identifierType` が `phone` の場合は必須です。国内番号を渡してください。ダイヤルコードはサーバー側で先頭に付加されます。
    </ParamField>

    <ParamField body="captcha?" type="string">
      captcha コード、または CAPTCHA プロバイダーからのレスポンスです。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="googleOneTap" type="Promise<void>">
  このメソッドは Google One Tap 認証情報を使用してユーザーを認証し、別のログインページにリダイレクトすることなくワンクリックでのサインインを可能にします。

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

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