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

# LoginPassword

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

LoginPassword クラスは、`login-password` 画面の機能を実装します。この画面では、ユーザーの識別子とパスワードを入力します。

![](https://mintlify.s3.us-west-1.amazonaws.com/docs-dev/images/cdy7uua7fh8z/Em8VqaD4fPUx6FRevD8fh/a9133a19565d5d9ddc1454535a0a7a11/loginpassword.png)

## コンストラクター

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

```typescript Example theme={null}
import LoginPassword from "@auth0/auth0-acul-js/login-password";
const loginPasswordManager = new LoginPassword();
loginPasswordManager.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-password` 画面の `id`、`name`、`logoUrl` など、クライアント関連の設定を提供します。

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

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

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

この画面で実行中の [Experiment Center](/docs/docs/ja-jp/customize/experiment-center) の実験です。実行中の実験がない場合 (または画面が `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)`

認証フロー内の現在の prompt に関するデータが含まれます。

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

設定やコンテキストなど、`login-password` 画面に固有の詳細が含まれます。

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

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

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

アクティブな識別子やフローの状態など、`login-password` 画面に固有の 取引 データを提供します。

**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 LoginPassword from "@auth0/auth0-acul-js/login-password";
const loginPasswordManager = new LoginPassword();
loginPasswordManager.changeLanguage({
  language: 'fr',
});
```

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

**パラメータ**

**options**

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

**language** `string` *required*

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

**persist?** `"session"`

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

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

このメソッドは、認証のためにユーザーを [Social](/docs/docs/ja-jp/authenticate/identity-providers/social-identity-providers) または [エンタープライズ IDプロバイダー](/docs/docs/ja-jp/authenticate/identity-providers/enterprise-identity-providers) (IdP) にリダイレクトします。

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

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

**パラメータ**

**options**

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

**connection** `string` *required*

Social またはエンタープライズ IDプロバイダーの接続名。

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

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

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

このメソッドは、コンテキストから取引のエラー配列を取得します。存在しない場合は空の配列を返します。取引 コンテキスト内のエラーオブジェクトの配列です。

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

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

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

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

**パラメータ**

**options**

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

**username** `string` *required*

ユーザーの 識別子。

**password** `string` *required*

ユーザーのパスワード。

**captcha?** `string`

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

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

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

**switchConnection** `Promise\<void\>`

このメソッドは、データベース接続 (パスワード) とパスワードレス接続 (Email/SMS OTP) を切り替えます。

```typescript Example theme={null}
import LoginPassword from "@auth0/auth0-acul-js/login-password";
const loginPasswordManager = new LoginPassword();
loginPasswordManager.switchConnection({
  connection: "email"
});
```

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

**パラメータ**

**options**

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

**connection** `string` *required*

切り替え先の接続名。パスワードレスには `'email'` または `'sms'` を使用し、パスワード認証には DB 接続名を使用します。

**switchToOtp** `Promise\<void\>`

このメソッドは、このログインにおいてパスワード入力からワンタイムパスコードの challenge に切り替えます。

オプションを表示する前に `screen.data.showSwitchToOtpButton` を確認してください。この取引で切り替えが利用可能かどうかを示します。

```typescript Example theme={null}
import LoginPassword from "@auth0/auth0-acul-js/login-password";
const loginPasswordManager = new LoginPassword();
loginPasswordManager.switchToOtp();
```
