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

# AI agentのユーザー認証

> Auth0をAI agentに統合し、ソーシャル、エンタープライズ、カスタムのIDプロバイダーを使用してユーザー認証を保護します。

[Auth0を使用したAIエージェントのユーザー認証](https://play.vidyard.com/cdwosENc4TT1ZhFdJmfKvF.html)

AI agentの認証では、ユーザーの身元を確認します。これにより、ユーザーデータを保護できるだけでなく、ユーザーの設定や会話履歴をセッション間で保持して、パーソナライズされた体験を提供できます。

## AI agentユーザー向けの認証

Auth0を使用すると、ユーザーは次の方法で安全にログインできます。

* ユーザー名とパスワード
* [パスワードレスとパスキー](https://auth0.com/docs/ja-jp/authenticate/passwordless)
* [ソーシャル](https://auth0.com/docs/ja-jp/authenticate/identity-providers/social-identity-providers)ログインと[エンタープライズ](https://auth0.com/docs/ja-jp/authenticate/identity-providers/enterprise-identity-providers)ログイン
* B2B AIアプリケーション向けの[企業の認証情報とシングルサインオン (SSO) ](https://auth0.com/docs/ja-jp/authenticate/single-sign-on)

![Auth0の認証フロー](https://mintlify.s3.us-west-1.amazonaws.com/auth0/docs/images/ai/authentication_for_users_of_ai_applications_diagram_light.png)

Auth0の認証フロー

## AI agentとAPIアクセスのための認証

Auth0を使用すると、サービスに自律的にアクセスするAI agentにも認証を拡張できます。

* マシンツーマシン認証：AI agentやバックエンドサービスの場合は、[クライアントの資格情報フロー](https://auth0.com/docs/ja-jp/get-started/authentication-and-authorization-flow/client-credentials-flow.md)、[相互TLS (mTLS) ](https://auth0.com/docs/ja-jp/get-started/authentication-and-authorization-flow/authenticate-with-mtls.md)、または[Private Key JWT](https://auth0.com/docs/ja-jp/get-started/authentication-and-authorization-flow/authenticate-with-private-key-jwt.md)を使用して、APIで直接認証します。
* 委任された認可：AI agentがユーザーに代わって動作する場合は、[On-Behalf-Ofトークン交換](https://auth0.com/docs/ja-jp/secure/call-apis-on-users-behalf/on-behalf-of-token-exchange.md)を使用して自社のAPIを呼び出すか、[Token Vault](https://auth0.com/docs/ja-jp/secure/call-apis-on-users-behalf/token-vault.md)によるさまざまなトークン交換を使用して、ユーザーに代わって外部のAPIを呼び出します。

## AI agent向けのユーザーログインフロー

Auth0では2種類のログインフローを提供しています。

1. [ユニバーサルログイン (推奨) ](https://auth0.com/docs/ja-jp/authenticate/login/auth0-universal-login)：ユーザーは、Auth0がホストする安全なログインページへリダイレクトされます。アプリケーションが認証情報を直接扱うことはなく、MFA、パスワードポリシー、IDプロバイダー接続を標準でサポートしています。クライアント側でレンダリングする、完全にカスタマイズしたログインスクリーンにも対応しています。

![ユニバーサルログインスクリーン](https://mintlify.s3.us-west-1.amazonaws.com/auth0/docs/images/ai/universal_login.png)

Auth0のユニバーサルログインスクリーン

2. [埋め込みログイン](https://auth0.com/docs/ja-jp/authenticate/login/embedded-login.md)：ログインUIをアプリケーションに直接組み込むため、ブランディングを自由に制御できます。ただし、認証情報の入力や安全な通信はチーム側で処理する必要があり、保守もより複雑になります。厳しく管理された環境で使う、特殊な社内ツールに適しています。

## はじめに

AI agentでAuth0の認証を利用するには、以下のリソースを参照してください。

### クイックスタート

> [card] [ユーザー認証](https://auth0.com/ai/docs/ja-jp/get-started/user-authentication.md)

> [card] [その他の公式クイックスタート](https://auth0.com/docs/ja-jp/quickstarts.md)

### サンプルアプリ

> [card] [フルスタック（Next.js、FastAPI）](https://github.com/auth0-samples/auth0-ai-samples/tree/main/authenticate-users)

> [card] [Agent0（React + Fastify + Vercel AI SDK）](https://github.com/auth0-samples/agent0)

> [card] [Assistant0（Next.js、FastAPI）](https://github.com/auth0-samples/auth0-assistant0)

## さらに詳しく

> [card] [Auth0ドキュメント](https://auth0.com/docs/ja-jp)

> [card] [認証API](https://auth0.com/docs/ja-jp/api/authentication.md)

> [card] [SDK](https://auth0.com/docs/ja-jp/libraries.md)
