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

# Login

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

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

![ACUL Login](https://mintlify.s3.us-west-1.amazonaws.com/docs-dev/images/cdy7uua7fh8z/5be9XfnulShqeXa4MXfXky/f3a5dded3539d4d683a525dfb6ad8042/Screenshot_2025-01-28_at_10.49.07.png)

## コンストラクター

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

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

## プロパティ

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

ブランディングテーマや設定など、ブランディング関連の構成を提供します。

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

`login` 画面用の、`id`、`name`、`logoUrl` などのクライアント関連の構成を提供します。

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

電話番号入力用の、`available` や `recommended` などの国コードデータを `login` 画面向けに提供します。

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

この画面で実行中の [Experiment Center](/docs/docs/ja-jp/customize/experiment-center) の experiment です。アクティブな experiment がない場合 (または画面が `context_configuration` でオプトインしていない場合) は `null` になります。

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

`id` や `name` など、ユーザーの組織に関する情報を提供します。

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

認証フローにおける現在のプロンプトに関するデータを含みます。

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

設定やコンテキストを含む、`login` 画面固有の詳細を含みます。

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

`id` や関連するメタデータなど、テナントに関するデータを含みます。

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

アクティブな識別子やフローの状態など、`login` 画面に関するトランザクション固有のデータを提供します。

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

ログイン中のユーザー入力など、SDK に渡される信頼できないデータを扱います。

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

`username`、`email`、`roles` など、現在のユーザーの詳細です。

## メソッド

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

このメソッドは、Universal Login ページの表示言語を変更します。

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

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

**パラメーター**

**options**

[LanguageChangeOptions](/docs/docs/ja-jp/libraries/acul/js-sdk/Screens/interfaces/LanguageChangeOptions)。

**language** `string` *required*

使用する言語のロケールコード (例: `'en'`、`'fr'`、`'es'`) 。

**persist?** `"session"`

`'session'` に設定すると、選択した言語はセッション中保持されます。

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

このメソッドは、認証のためにユーザーを [Social](/docs/docs/ja-jp/authenticate/identity-providers/social-identity-providers) または [Enterprise Identity Provider](/docs/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"
});
```

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

**パラメーター**

**connection** `string` *required*

Social または Enterprise Identity Provider の接続名。

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

`ulp-` で始まる追加のカスタムフィールドです (例: `'ulp-custom-field'`) 。

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

このメソッドは、コンテキストから トランザクション のエラー配列を取得します。存在しない場合は空の配列を返します。トランザクション コンテキスト内の error object の配列です。

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

このメソッドは、`login` 画面で有効な識別子タイプを返します。

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

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

このメソッドは、識別子と入力されたパスワードに基づいてユーザーを認証します。

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

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

**パラメーター**

**options**

[LoginPayloadOptions](/docs/docs/ja-jp/libraries/acul/js-sdk/Screens/interfaces/LoginPayloadOptions)。

**identifier?** `string`

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

**username?** `string`

元のスペルで指定するユーザー識別子です。これまたは `identifier` を指定してください。

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

`identifier` (または `username`) に格納される値の種類です。通常は `screen.data.activeIdentifierType` から読み取ります。識別子を型指定なしで送信する場合は省略してください。

**password** `string` *required*

ユーザーのパスワードです。

**phoneCountryCode?** `string`

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

**captcha?** `string`

captcha コード、または CAPTCHA プロバイダーからのレスポンスです。Auth0 テナントで [ボット検出](/docs/docs/ja-jp/secure/attack-protection/bot-detection) が有効になっている場合、このプロパティは必須です。

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

`ulp-` で始まる追加のカスタムフィールドです (例: `'ulp-custom-field'`) 。

**googleOneTap** `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 });
```

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

**パラメーター**

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

Google Identity Services のプロンプトから返される Google One Tap 認証情報トークン。

**pickCountryCode** `Promise\<void\>`

このメソッドは、ユーザーを国コード選択リストにリダイレクトします。そこで電話番号の国コードプレフィックスを更新できます。

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