auth0 について
認証の目的とプロジェクトのフレームワークに応じて、Auth0 の関連資料を選ぶスキルです。認証連携、機能設定、セキュリティ監査、トラブルシューティングのほか、CLI や SDK・プロバイダーの移行にも対応します。
主な機能
- 01認証目的とフレームワークを判定
- 02選択した機能の資料を読み込み
- 03MFA、パスキー、組織機能に対応
- 04セキュリティ監査と健全性確認を案内
- 05デバッグ、移行、CLI 作業を支援
活用シーン
- 01アプリに Auth0 ログインを追加
- 02MFA やパスキーを設定
- 03テナントの安全性と健全性を確認
- 04認証エラーの調査やプロバイダー移行
インストール
コマンドをコピーしてターミナルで実行します。
npx skills add https:/ / github.com/ auth0/ agent-skills --skill auth0インストール後、Claude Code で/auth0を入力して読み込まれたか確認します。
同梱ファイル
SKILL.md と一緒にインストールされる参考資料やスクリプト。
agents/openai.yamlassets/acul/js-templates/login-id.jslogin-password.jsassets/acul/react-templates/login-id.tsxlogin-password.tsxassets/acul/theme-templates/globals.csstailwind.config.tstheme-provider.tstokens.cssassets/audit/report-template.htmlreport-template.mdassets/healthcheck/report-template.htmlreport-template.mdreferences/feature-acul/index.mdreferences/feature-audit-pricing/index.mdreferences/feature-audit-remediation/index.mdreferences/feature-audit/index.mdreferences/feature-branding/index.mdreferences/feature-custom-domains/index.mdreferences/feature-custom-token-exchange/auth0-android.mdauth0-api-python.mdauth0-auth-js.mdauth0-react.mdauth0-server-js.mdauth0-server-python.mdauth0-spa-js.mdauth0-swift.mdindex.mdnextjs-auth0.mdreact-native-auth0.md詳細
Auth0
インテントを検出 → フレームワークを検出 → ツールを検出 → 2~3 個のリファレンスファイルを読み込みます。
ステップ 1:インテントの検出
リクエストを 開発者が求めていること の列と照合します。この列には Auth0 の用語だけではなく、目的が平易な言葉で記載されています。選んだ インテント は検索キーです。ステップ 4 では、読み込むリファレンスファイルを示すセクション見出し(### feature:mfa)としてそのまま表示されます。
| 開発者が望んでいること(平易な表現+Auth0 用語) | 意図 |
|---|---|
| アプリにログイン、サインアップ、サインイン、「ユーザーがログイン/アカウント作成できるようにする」を追加する、またはアプリやスクリプトに Auth0 SDK を追加して使用する | integrate |
| パスワードの後に、ワンタイムコード、SMS またはメールのコード、認証アプリ、パスキー/指紋/顔認証/セキュリティキーを追加の要素として使用するなど、2つ目のステップを必須にする。または、機密性の高い操作の前に本人確認を再度行う。Auth0:多要素認証(MFA)、二要素認証(2FA)、二段階認証、ステップアップ認証。 | feature:mfa |
| パスワードの代わりにパスキー、指紋、または Face ID でユーザーがサインアップまたはサインインできるようにする(主要な認証情報としてのパスワードレス WebAuthn)、またはサインイン済みのユーザーがアカウントにパスキーを追加できるようにする。Auth0:パスキー、WebAuthn、パスワードレスログイン。 | feature:passkeys |
| 個別の企業、チーム、ワークスペース、またはテナントごとに、独自のユーザー、メンバー、ロール、ログインを持てるようにする。通常、企業向けに販売される製品が該当します。Auth0:Organizations、マルチ組織、B2B SaaS。 | feature:organizations |
| 「マイアカウント」や「マイ組織」の UI を構築する代わりに、プロフィール、パスキー、MFA、または組織の詳細を管理できる、ホスト型のセルフサービス用ポータルをデプロイする。Auth0:Universal Portals、My Account ポータル、My Organization ポータル。 | feature:universal-portals |
デフォルトの Auth0 URL ではなく、独自のウェブアドレス(例:login.example.com、auth.company.com)からログインページを提供する。Auth0:カスタムドメイン。 | feature:custom-domains |
| テーマ設定で可能な範囲を超えて、独自のコードやフレームワークで完全にカスタマイズしたログイン/サインアップ画面を構築する。Auth0:Universal Login の高度なカスタマイズ(ACUL)。 | feature:acul |
| ロゴ、色、フォント、背景、全体のテーマなど、ログインページの外観を変更する。Auth0:ブランディング、Universal Login のカスタマイズ。 | feature:branding |
| トークンをクライアントにバインドし、盗まれたり漏えいしたりしたトークンが別のマシンから再利用/リプレイされないようにする。Auth0:DPoP(Demonstrating Proof-of-Possession)、送信者制約付きトークン。 | feature:dpop |
| 外部またはパートナーのトークン(レガシーシステム、MCP/エージェント、または別の IdP)を、インタラクティブなログインなしで Auth0 トークンに交換する。Auth0:カスタムトークン交換(CTE)、RFC 8693、subject_token。 | feature:custom-token-exchange |
| テナントのセキュリティ/設定上の問題を監査して報告し、必要に応じて検出事項を修正する。Auth0:テナント監査、CheckMate。 | audit |
| テナントが正常な状態にあり、適切なプランを利用しているかを、2つのスコアと推奨事項で確認する。Auth0:ヘルスチェック。 | healthcheck |
| ベストプラクティス、「これは安全ですか?」、トークンを安全に扱う方法、「X はどうすればよいか」を尋ねる。Auth0:ガイダンス/セキュリティ。 | guidance |
| 401 Unauthorized、403 Forbidden、CORS、コールバック URL の不一致、リダイレクトループなどのエラーが発生した。Auth0:デバッグ。 | debug |
| レート制限(429 Too Many Requests、クォータ超過)が発生した。Auth0:レート制限。 | debug:rate-limit |
| 既存のアプリを Clerk、NextAuth.js、Firebase、Cognito、Okta、Supabase、Passport.js、または別の認証プロバイダーから移行する。Auth0:プロバイダー移行。 | migrate |
| Auth0 SDK 自体を新しいメジャーバージョンにアップグレードする(例:Auth0.swift v2→v3、Auth0.Android v3→v4)。破壊的変更、非推奨 API、「最新の SDK に更新する」などが該当します。Auth0:SDK のメジャーバージョンアップグレード。 | upgrade-sdk |
| Auth0 の Vercel Marketplace インテグレーションをインストールする、Auth0 を Vercel プロジェクトに接続する、または Auth0 の設定を Vercel でホストされた Next.js アプリに同期する。Auth0:Vercel ネイティブインテグレーション。 | integrate |
Auth0 CLI を直接使用する。「auth0 CLI でアプリ/API を作成する」、テナントのセットアップをスクリプト化する、または CI で Auth0 の設定を自動化するなど、アプリケーションフレームワークを使用しない場合。Auth0:CLI/ツールのみ。 | tooling |
該当するものがない場合
最も近い目標を選択してください。目標が本当に不明確な場合は、意図を推測せず、開発者が何を達成しようとしているのか尋ねてください。
ステップ 2:フレームワークを検出する
toolingインテントの場合、このステップはスキップしてください — CLI 優先のリクエストにはフレームワークがありません。ステップ 3 に進み、tooling リファレンスを読み込みます。開発者が後からアプリへの認証の統合に話題を切り替えた場合にのみ、フレームワークについて質問してください。
上から順に確認します。フレームワークが見つかった最初のティアで確認を終了してください。
ティア 1 — Auth0 SDK がすでにインストールされている(最も強いシグナル)
Node.js / JavaScript / TypeScript — package.json の dependencies を確認する
行は具体性の高い順です。Ionic/Capacitor プロジェクトにはベース SDK も含まれるため、先に @capacitor/browser の行を確認してください。
| パッケージ | フレームワーク |
|---|---|
@capacitor/browser + @auth0/auth0-angular | ionic-angular |
@capacitor/browser + @auth0/auth0-react | ionic-react |
@capacitor/browser + @auth0/auth0-vue | ionic-vue |
@auth0/nextjs-auth0 | nextjs |
@auth0/auth0-nuxt | nuxt |
@auth0/auth0-tanstack-start-react | tanstack-start |
@auth0/auth0-react | react |
@auth0/auth0-vue | vue |
@auth0/auth0-angular | angular |
@auth0/auth0-spa-js | spa-js |
express-openid-connect | express |
@auth0/auth0-fastify | fastify |
@auth0/auth0-fastify-api | fastify-api |
express-oauth2-jwt-bearer | express-jwt |
react-native-auth0 + app.json または app.config.js が存在する | expo |
react-native-auth0(Expo ファイルなし) | react-native |
@auth0/auth0-api-js | auth0-api-js |
@auth0/auth0-server-js | auth0-server-js |
@auth0/auth0-auth-js | auth0-auth-js |
auth0(@auth0/* ではないベアパッケージ) | node-auth0 |
Python — requirements.txt または pyproject.toml を確認する
行は具体性の高い順です。auth0-server-python はフレームワークに依存しないサーバーコアであるため、ベア SDK の行に進む前に、同時にインストールされている Web フレームワークを確認してください。
| パッケージ | フレームワーク |
|---|---|
auth0-server-python + flask | flask |
auth0-server-python(Flask Web フレームワークなし) | server-python |
auth0-fastapi-api | fastapi-api |
auth0-api-python | api-python |
Java / Kotlin — build.gradle または pom.xml を確認する
| 依存関係 | フレームワーク |
|---|---|
mvc-auth-commons(com.auth0:mvc-auth-commons) | java-mvc |
spring-security-oauth2-resource-server | springboot-api |
.NET — *.csproj または NuGet.Config を確認する
| パッケージ | フレームワーク |
|---|---|
Auth0.AspNetCore.Authentication(.Api サフィックスなし) | aspnetcore-auth |
Auth0.AspNetCore.Authentication.Api | aspnetcore-api |
Auth0.OidcClient.MAUI | maui |
Auth0.OidcClient.AndroidX | net-android |
Auth0.OidcClient.iOS | net-ios |
Auth0.OidcClient.WinForms | winforms |
Auth0.OidcClient.WPF | wpf |
PHP — composer.json を確認する
auth0/auth0-php は、SdkConfiguration の strategy を通じて PHP Web アプリと API の両方を動かします。STRATEGY_API の行のほうが具体的なため、先に確認してください。
| パッケージ | フレームワーク |
|---|---|
auth0/auth0-php + SdkConfiguration::STRATEGY_API(または strategy: 'api') | php-api |
auth0/auth0-php(STRATEGY_API なし/STRATEGY_REGULAR または strategy: 'webapp') | php |
auth0/login(laravel、AuthorizationGuard なし) | laravel |
auth0/login + AuthorizationGuard | laravel-api |
auth0/auth0-phpがインストールされていても、SdkConfigurationの strategy がまだ設定されていない場合(新規プロジェクト)は、以下のバリアントの判別に進んでください。
Go — go.mod を確認する
| モジュール | フレームワーク |
|---|---|
github.com/auth0/go-jwt-middleware | go |
モバイル(ネイティブ)
| シグナル | フレームワーク |
|---|---|
build.gradle(.kts) + com.auth0.kmp:auth0(Kotlin Multiplatform モジュール) | kmp |
Package.swift または .xcodeproj + Auth0.swift | swift |
build.gradle + com.auth0.android:auth0 | android |
pubspec.yaml + auth0_flutter + 開発者名/ターゲットが Windows デスクトップを示す | flutter-windows |
pubspec.yaml + auth0_flutter + flutter.web: false | flutter-native |
pubspec.yaml + auth0_flutter + Web が有効 | flutter-web |
Tier 2 — Auth0 以外のワークスペース依存関係からフレームワークを判定
Auth0 SDK に該当するものが見つからなかった場合は、一般的な(Auth0 以外の)
依存関係からフレームワークを判定します。**最初に一致したものを採用してください。**これでベースを決定し、Web と API の
バリアントは、以下の「バリアントの判別」で決定します。Tier 1 と同様に、ベースフレームワークより先に
@ionic/* の行を確認してください。
| シグナル | ベースフレームワーク |
|---|---|
package.json に next がある | nextjs |
package.json に nuxt がある | nuxt |
package.json に @tanstack/react-start がある | tanstack-start |
@ionic/* + @angular/core | ionic-angular |
@ionic/* + react | ionic-react |
@ionic/* + vue | ionic-vue |
package.json に @angular/core がある | angular |
package.json に vue がある(nuxt はない) | vue |
package.json に expo がある | expo |
react-native(expo はない) | react-native |
react(上記のメタフレームワークはない) | react(SPA)— 注を参照 |
package.json に express がある | express(以下のバリアント) |
package.json に fastify がある | fastify(以下のバリアント) |
requirements.txt/pyproject.toml に flask がある | flask |
requirements.txt/pyproject.toml に fastapi がある | fastapi-api(以下のバリアント) |
pom.xml/build.gradle に spring-boot がある | springboot-api |
composer.json に laravel/framework がある | laravel(以下のバリアント) |
composer.json が存在する(Laravel はない) | php(以下のバリアント) |
go.mod が存在し、HTTP サーバー/ルーターがある | go |
org.jetbrains.kotlin.multiplatform プラグイン + commonMain ソースセット(Android+iOS 共通モジュール) | kmp |
Package.swift または .xcodeproj | swift |
pubspec.yaml(Flutter)+ 開発者名/ターゲットが Windows デスクトップを指定 | flutter-windows |
pubspec.yaml(Flutter、Web は無効) | flutter-native |
pubspec.yaml(Flutter、Web は有効) | flutter-web |
MAUI を参照する *.csproj | maui |
*.csproj(WinForms) | winforms |
*.csproj(WPF) | wpf |
*.csproj ASP.NET(Web アプリまたは API) | aspnetcore(以下のバリアント) |
reactに関する注記: 通常の React プロジェクトは、React SDK を使用する SPA であればreactに、フレームワークに依存しないバニラ JavaScript のアプリであればspa-jsに対応します。不明な場合は、 読み込む前に確認してください。
Tier 3 — プロンプトからフレームワークを特定
ワークスペース内のシグナルに一致しない場合は、リクエストで指定されたフレームワークまたは言語に対応付けます。最初に一致した項目で止めてください。
| 開発者が言及しているもの | フレームワーク |
|---|---|
Next.js / next | nextjs |
| Nuxt | nuxt |
| TanStack Start (React) | tanstack-start |
| Angular(Ionic を除く) | angular |
| Vue(Nuxt/Ionic を除く) | vue |
| React SPA(Next.js を除く) | react |
| vanilla JS / plain JS / フレームワークを使わない SPA | spa-js |
node-auth0 / auth0 npm パッケージ | node-auth0 |
@auth0/auth0-api-js / auth0-api-js / 低レベルのリソースサーバー SDK | auth0-api-js |
@auth0/auth0-server-js / auth0-server-js / サーバーサイド Auth0 セッション SDK | auth0-server-js |
@auth0/auth0-auth-js / auth0-auth-js / AuthClient / 低レベルの OAuth OIDC | auth0-auth-js |
| Express(ウェブアプリ/サーバーレンダリング) | express |
| Express API / API ルートを保護する | express-jwt |
| Fastify(ウェブ)/ Fastify API | fastify / fastify-api |
| Flask | flask |
| FastAPI(ウェブアプリ)/ FastAPI API | server-python / fastapi-api |
auth0-server-python / フレームワークに依存しない Python サーバー SDK / 専用リファレンスがない Python OIDC ウェブサーバー(Django、Starlette、Sanic、Quart、aiohttp) | server-python |
auth0-api-python / Python API JWT バリデーター(リソースサーバー / verify_access_token) | api-python |
| Spring Boot | springboot-api |
| Java MVC / servlet | java-mvc |
| ASP.NET Core ウェブアプリ / API | aspnetcore-auth / aspnetcore-api |
| MAUI / WinForms / WPF | maui / winforms / wpf |
| PHP ウェブアプリ / PHP API | php / php-api |
| Laravel ウェブアプリ / Laravel API | laravel / laravel-api |
| Go / Golang API | go |
Kotlin Multiplatform / KMP / Android+iOS の共有認証コード / com.auth0.kmp | kmp |
| Swift / iOS | swift |
| Android / Kotlin | android |
| Flutter(ネイティブ/ウェブ/Windows) | flutter-native / flutter-web / flutter-windows |
| React Native / Expo | react-native / expo |
| Ionic(Angular/React/Vue) | ionic-angular / ionic-react / ionic-vue |
バリアントの判別(ウェブアプリと API)
一部のフレームワークには、ウェブアプリと API 用の別々のリファレンスがあります。Tier 1 でバリアントが確定していない場合は、意図を優先して選択します。
| ベース | ウェブアプリ用バリアント | API 用バリアント | 次の場合は API を選択 |
|---|---|---|---|
| express | express | express-jwt | API ルートの保護/JWT の検証で、サーバーレンダリングされた UI がない |
| fastify | fastify | fastify-api | リソースサーバー/JWT 検証のみ |
| fastapi | server-python | fastapi-api | リソースサーバー/JWT 検証のみ。ログイン/ログアウト UI を備えたウェブアプリでは server-python を使用 |
| php | php | php-api | ウェブ UI のない PHP API の構築/保護 |
| laravel | laravel | laravel-api | API 専用(トークンガード)で、Blade UI がない |
| aspnetcore | aspnetcore-auth | aspnetcore-api | ウェブ API/JWT ベアラーで、Cookie ログイン UI がない |
意図がまだ曖昧な場合(UI と保護対象のエンドポイントの両方がある、または不明確な場合)は、読み込む前に検出した内容を伝え、開発者にウェブアプリか API かを確認してください。
一致するものがない場合
開発者に使用しているフレームワーク/言語を確認してください。推測しないでください。
競合
Tier 2(ワークスペース)と Tier 3(プロンプト)が実質的に食い違う場合(例:プロンプトでは「Next.js」と指定されているのに、package.json に next がない場合)は、競合を伝えて確認してください。黙って選択してはいけません。両方の情報があり、一致している場合は、プロンプトよりワークスペース内のシグナルを優先します。
Step 3: ツールを検出する
プロジェクトのファイルツリーとリクエストを確認します。これはプロジェクトのコンテキストに基づく判断です。
| プロジェクトに含まれるもの | 読み込むもの |
|---|---|
terraform/ ディレクトリ、または任意の *.tf ファイル | tooling-terraform/index.md |
| このエージェントセッションで Auth0 MCP サーバーが有効 | tooling-mcp/index.md |
| Auth0 Vercel Marketplace/ネイティブ統合のリクエスト、または Auth0 を Vercel プロジェクトに接続するリクエスト | tooling-vercel/index.md |
| 上記以外(デフォルト) | tooling-cli/index.md |
ステップ 4:リファレンスファイルを読み込む
以下から、ステップ 1 で選んだ Intent と一致する見出しのセクションを探し、そこに記載されているリファレンスファイルを読みます。
integrate
Read: references/framework-{framework}/index.md
Read: references/tooling-{tooling}/index.md
Follow the integration workflow in references/framework-{framework}/index.md.
Use references/tooling-{tooling}/index.md for all Auth0 tenant configuration steps.
feature:mfa
Read: references/feature-mfa/index.md
Read: references/tooling-{tooling}/index.md
feature:passkeys
Read: references/feature-passkeys/index.md
Then Read the detected SDK's passkey leaf from the hub's "Example code snippets" table (e.g. nextjs → nextjs-auth0.md; react-native/expo → ONLY react-native-auth0.md, which covers react-native-web — never auth0-react.md) — it has the exact API and ceremony; don't implement from framework-{framework}/index.md alone.
Read: references/tooling-{tooling}/index.md
If framework detected: Read references/framework-{framework}/index.md
feature:organizations
Read: references/feature-organizations/index.md
Read: references/tooling-{tooling}/index.md
If framework detected: Read references/framework-{framework}/index.md
If multi-tenant architecture / B2B SaaS design question: also Read references/pattern-multi-tenant/index.md
feature:universal-portals
Read: references/feature-universal-portals/index.md
Read: references/tooling-{tooling}/index.md
feature:custom-domains
Read: references/feature-custom-domains/index.md
Read: references/tooling-{tooling}/index.md
feature:acul
Read: references/feature-acul/index.md
Read: references/tooling-{tooling}/index.md
feature:branding
Read: references/feature-branding/index.md
Read: references/tooling-{tooling}/index.md
feature:dpop
Read: references/feature-dpop/index.md
Read: references/tooling-{tooling}/index.md
If a SPA framework is detected (vue/react/angular/spa-js): Read references/framework-{framework}/index.md
DPoP is SPA-only (no SSR: Next.js/Nuxt) — feature-dpop/index.md states the exclusion.
feature:custom-token-exchange
Read: references/feature-custom-token-exchange/index.md
Read: references/tooling-{tooling}/index.md
If framework detected: Read references/framework-{framework}/index.md
guidance
Read: references/pattern-security/index.md
If framework detected: Read references/framework-{framework}/index.md (for SDK-specific guidance — token storage, session handling, route protection)
If token handling / JWT vs opaque / storage: Read references/pattern-token-handling/index.md
If multi-tenant / B2B architecture: Read references/pattern-multi-tenant/index.md + references/feature-organizations/index.md
debug
Read: references/pattern-common-errors/index.md
If framework detected: Read references/framework-{framework}/index.md
debug:rate-limit
Read: references/pattern-rate-limiting/index.md
migrate
Read: references/feature-migration/index.md
Read: references/tooling-{tooling}/index.md
If framework detected: Read references/framework-{framework}/index.md
audit
Read: references/feature-audit/index.md
Read: references/feature-audit-pricing/index.md
Read: references/feature-audit-remediation/index.md
Read: references/tooling-{tooling}/index.md
Apply findings only with per-command confirmation; verify each change by re-fetch.
healthcheck
Read: references/feature-healthcheck/index.md
Read: references/feature-audit/index.md
Read: references/feature-audit-pricing/index.md
Read: references/feature-audit-remediation/index.md
Read: references/tooling-{tooling}/index.md
If a scan can run, do the audit workflow first, then score and recommend a plan. If not, score capability fit and recommend anyway. Never quote Enterprise pricing.
upgrade-sdk
Read: references/framework-{framework}/index.md
Follow its "Major Version Migration" section (e.g. Auth0.swift v3, Auth0.Android v4).
This is an Auth0 SDK version bump — NOT a provider migration. Do not load feature-migration/index.md.
If no framework is detected: ask which Auth0 SDK the developer is upgrading.
tooling
Read: references/tooling-{tooling}/index.md
No framework file — this is a CLI/tooling-only task (create apps/APIs, script
tenant setup, automate config in CI). If the developer then wants to integrate
auth into an app, return to Step 1 with the integrate intent.