次のような場合に使用: Auth0(認証サービス)を使ったログイン機能をアプリに追加する際に、どのSDK(開発キット)やスキルを選べばいいか分からない場合。 このスキルはプロジェクトの開発環境を自動で判別して、適切なセットアップの手順へ案内します。ユーザーが「アプリにログイン機能を追加したい」「Auth0をセットアップしたい」と言うだけで、開発環境の名前を明確に指定していない場合でも、これをまず使うべき出発点として機能します。
Use when adding Auth0 authentication to any app and unsure which SDK or skill to use. Detects the project's framework and routes to the right setup workflow — use this as the entry point even if the user just says "add login to my app" or "set up Auth0" without naming a framework.
フレームワークを自動検出して、Auth0 認証をすぐに始めましょう。
以下のコマンドを実行してフレームワークを特定します:
# package.json の依存関係を確認(Node.js プロジェクト)
cat package.json | grep -E "react|next|vue|nuxt|angular|express|fastify|@nestjs|expo"
# またはプロジェクトファイルを確認
ls -la | grep -E "angular.json|vue.config.js|next.config|app.json|Package.swift|build.gradle"
フレームワーク検出テーブル:
| フレームワーク | 検出方法 | 使用する Skill |
|---|---|---|
| React (Vite/CRA) | package.json に "react" があり、Next.js なし |
auth0-react |
| Next.js | package.json に "next" がある |
auth0-nextjs |
| Vue.js | package.json に "vue" があり、Nuxt なし |
auth0-vue |
| Nuxt | package.json に "nuxt" がある |
auth0-nuxt |
| Angular | angular.json が存在するか "@angular/core" がある |
auth0-angular |
| Express.js | package.json に "express" がある |
auth0-express |
| Fastify(Web アプリ) | package.json に "fastify" があり、@fastify/view を使用 |
auth0-fastify |
| Fastify(API) | package.json に "fastify" があり、ビューエンジンなし |
auth0-fastify-api |
| React Native | package.json に "react-native" または "expo" がある |
auth0-react-native |
| Flask | requirements.txt、Pipfile、または pyproject.toml に "flask" がある |
auth0-flask |
| Node.js API | package.json に "express-oauth2-jwt-bearer" がある |
express-oauth2-jwt-bearer |
| ASP.NET Core Web アプリ | *.csproj が存在し、Views/ または Pages/ フォルダがある |
auth0-aspnetcore-authentication |
お使いのフレームワークが見当たらない場合は、 下記の Tier 2 フレームワークをご確認ください。
macOS/Linux:
brew install auth0/auth0-cli/auth0
Windows:
scoop install auth0
# または: choco install auth0-cli
詳細なインストール手順: CLI リファレンス を参照
auth0 login
ブラウザが開き、Auth0 での認証が行われます。
フレームワークに応じてアプリケーションの種類を選択してください:
シングルページアプリケーション(React、Vue、Angular):
auth0 apps create --name "My App" --type spa \
--auth-method None \
--callbacks "http://localhost:3000" \
--logout-urls "http://localhost:3000" \
--metadata "created_by=agent_skills"
通常の Web アプリ(Next.js、Nuxt、Express、Fastify):
auth0 apps create --name "My App" --type regular \
--callbacks "http://localhost:3000/api/auth/callback" \
--logout-urls "http://localhost:3000" \
--metadata "created_by=agent_skills"
ネイティブアプリ(React Native):
auth0 apps create --name "My App" --type native \
--auth-method None \
--callbacks "myapp://callback" \
--logout-urls "myapp://logout" \
--metadata "created_by=agent_skills"
認証情報を取得する:
auth0 apps list # アプリを検索
auth0 apps show <app-id> # クライアント ID とシークレットを確認
その他の CLI コマンド: CLI リファレンス を参照
アプリケーションを作成したら、Auth0 ユニバーサルログインページがあなたのアプリのデザインと一致するようにブランディングを適用します:
auth0 ul update \
--accent "#YOUR_BRAND_COLOR" \
--background "#YOUR_BACKGROUND_COLOR" \
--logo "https://your-app.com/logo.png" \
--favicon "https://your-app.com/favicon.ico"
これにより、デフォルトの Auth0 ブランディングではなく、あなたのアプリのブランディングがログイン画面に表示されます。
完全なカスタムログイン画面のデザインには、acul-screen-generator skill も活用できます。
フレームワーク検出の結果に基づき、適切な skill を選択してください:
フロントエンド:
auth0-react - React SPA(Vite、Create React App)auth0-nextjs - Next.js(App Router および Pages Router)auth0-vue - Vue.js 3 アプリケーションauth0-nuxt - Nuxt 3/4 アプリケーションauth0-angular - Angular 12 以降のアプリケーションバックエンド:
auth0-express - Express.js Web アプリケーションauth0-flask - Flask Web アプリケーションauth0-fastify - Fastify Web アプリケーションauth0-fastify-api - Fastify API 認証express-oauth2-jwt-bearer - Node.js/Express API JWT Bearer 検証auth0-aspnetcore-authentication - ASP.NET Core MVC、Razor Pages、Blazor Server Web アプリケーションモバイル:
auth0-react-native - React Native および Expo(iOS/Android)個別の skill はまだ提供されていません。Auth0 ドキュメントをご参照ください:
フロントエンド:
バックエンド:
モバイル:
別の認証プロバイダーから移行する場合は、 auth0-migration skill を使用してください。
この migration skill がカバーする内容:
フレームワーク別の環境変数設定:
コアコンセプトとトラブルシューティング:
Auth0 CLI の完全リファレンス:
| 間違い | 対処方法 |
|---|---|
| アプリケーションの種類が間違っている | SPA は「Single Page Application」、サーバーアプリは「Regular Web Application」、モバイルは「Native」を選択 |
| コールバック URL が設定されていない | Auth0 ダッシュボードの「Allowed Callback URLs」にアプリのコールバック URL を追加 |
| 認証情報の誤用 | クライアントシークレットは Regular Web App のみ必要。SPA には不要 |
| コードに認証情報をハードコーディングしている | 必ず環境変数を使用し、シークレット情報は git にコミットしない |
| ローカルでのテストを省略している | 本番環境へのデプロイ前に、Auth0 で localhost URL を設定してテストする |
| アプリケーションの種類を混在させている | サーバーサイドアプリに SPA SDK を使用したり、その逆をしたりしない |
auth0-migration - 他の認証プロバイダーからの移行auth0-spa-js - SPA インテグレーションauth0-react - React SPA インテグレーションauth0-nextjs - Next.js インテグレーションauth0-vue - Vue.js インテグレーションauth0-nuxt - Nuxt 3/4 インテグレーションauth0-angular - Angular インテグレーションauth0-express - Express.js インテグレーションauth0-flask - Flask Web アプリインテグレーションauth0-fastify - Fastify Web アプリインテグレーションauth0-fastify-api - Fastify API インテグレーションexpress-oauth2-jwt-bearer - Node.js/Express API JWT Bearer 検証auth0-react-native - React Native CLI(bare workflow)インテグレーションauth0-expo - Expo(managed workflow)インテグレーションauth0-android - Android(Kotlin/Java)インテグレーションauth0-swift - iOS/macOS(Swift)インテグレーションauth0-fastapi-api - FastAPI API 認証auth0-aspnetcore-authentication - ASP.NET Core Web アプリ認証auth0-aspnetcore-api - ASP.NET Core API 認証auth0-mfa - 多要素認証(MFA)Detect your framework and get started with Auth0 authentication.
Run this command to identify your framework:
# Check package.json dependencies (Node.js projects)
cat package.json | grep -E "react|next|vue|nuxt|angular|express|fastify|@nestjs|expo"
# Or check project files
ls -la | grep -E "angular.json|vue.config.js|next.config|app.json|Package.swift|build.gradle"
Framework Detection Table:
| Framework | Detection | Skill to Use |
|---|---|---|
| React (Vite/CRA) | "react" in package.json, no Next.js |
auth0-react |
| Next.js | "next" in package.json |
auth0-nextjs |
| Vue.js | "vue" in package.json, no Nuxt |
auth0-vue |
| Nuxt | "nuxt" in package.json |
auth0-nuxt |
| Angular | angular.json exists or "@angular/core" |
auth0-angular |
| Express.js | "express" in package.json |
auth0-express |
| Fastify (web app) | "fastify" in package.json, has @fastify/view |
auth0-fastify |
| Fastify (API) | "fastify" in package.json, no view engine |
auth0-fastify-api |
| React Native | "react-native" or "expo" in package.json |
auth0-react-native |
| Flask | "flask" in requirements.txt, Pipfile, or pyproject.toml |
auth0-flask |
| Node.js API | "express-oauth2-jwt-bearer" in package.json |
express-oauth2-jwt-bearer |
| ASP.NET Core web app | *.csproj exists, has Views/ or Pages/ folder |
auth0-aspnetcore-authentication |
Don't see your framework? See Tier 2 Frameworks below.
macOS/Linux:
brew install auth0/auth0-cli/auth0
Windows:
scoop install auth0
# Or: choco install auth0-cli
Full installation guide: See CLI Reference
auth0 login
This opens your browser to authenticate with Auth0.
Choose application type based on your framework:
Single Page Applications (React, Vue, Angular):
auth0 apps create --name "My App" --type spa \
--auth-method None \
--callbacks "http://localhost:3000" \
--logout-urls "http://localhost:3000" \
--metadata "created_by=agent_skills"
Regular Web Apps (Next.js, Nuxt, Express, Fastify):
auth0 apps create --name "My App" --type regular \
--callbacks "http://localhost:3000/api/auth/callback" \
--logout-urls "http://localhost:3000" \
--metadata "created_by=agent_skills"
Native Apps (React Native):
auth0 apps create --name "My App" --type native \
--auth-method None \
--callbacks "myapp://callback" \
--logout-urls "myapp://logout" \
--metadata "created_by=agent_skills"
Get your credentials:
auth0 apps list # Find your app
auth0 apps show <app-id> # Get client ID and secret
More CLI commands: See CLI Reference
After creating your application, apply branding so the Auth0 Universal Login page matches your app:
auth0 ul update \
--accent "#YOUR_BRAND_COLOR" \
--background "#YOUR_BACKGROUND_COLOR" \
--logo "https://your-app.com/logo.png" \
--favicon "https://your-app.com/favicon.ico"
This ensures users see your app's branding on the login screen instead of the default Auth0 branding. You can also use the acul-screen-generator skill for full custom login screen design.
Based on your framework detection, use the appropriate skill:
Frontend:
auth0-react - React SPAs (Vite, Create React App)auth0-nextjs - Next.js (App Router and Pages Router)auth0-vue - Vue.js 3 applicationsauth0-nuxt - Nuxt 3/4 applicationsauth0-angular - Angular 12+ applicationsBackend:
auth0-express - Express.js web applicationsauth0-flask - Flask web applicationsauth0-fastify - Fastify web applicationsauth0-fastify-api - Fastify API authenticationexpress-oauth2-jwt-bearer - Node.js/Express API JWT Bearer validationauth0-aspnetcore-authentication - ASP.NET Core MVC, Razor Pages, Blazor Server web applicationsMobile:
auth0-react-native - React Native and Expo (iOS/Android)Not yet available as separate skills. Use Auth0 documentation:
Frontend:
Backend:
Mobile:
Migrating from another auth provider? Use the auth0-migration skill.
The migration skill covers:
Framework-specific environment variable setup:
Core concepts and troubleshooting:
Complete Auth0 CLI reference:
| Mistake | Fix |
|---|---|
| Wrong application type | SPAs need "Single Page Application", server apps need "Regular Web Application", mobile needs "Native" |
| Callback URL not configured | Add your app's callback URL to Allowed Callback URLs in Auth0 Dashboard |
| Using wrong credentials | Client Secret only needed for Regular Web Apps, not SPAs |
| Hardcoding credentials in code | Always use environment variables, never commit secrets to git |
| Not testing locally first | Set up localhost URLs in Auth0 before deploying to production |
| Mixing application types | Don't use SPA SDK for server-side apps or vice versa |
auth0-migration - Migrate from other auth providersauth0-spa-js - SPA integrationauth0-react - React SPA integrationauth0-nextjs - Next.js integrationauth0-vue - Vue.js integrationauth0-nuxt - Nuxt 3/4 integrationauth0-angular - Angular integrationauth0-express - Express.js integrationauth0-flask - Flask web app integrationauth0-fastify - Fastify web app integrationauth0-fastify-api - Fastify API integrationexpress-oauth2-jwt-bearer - Node.js/Express API JWT Bearer validationauth0-react-native - React Native CLI (bare workflow) integrationauth0-expo - Expo (managed workflow) integrationauth0-android - Android (Kotlin/Java) integrationauth0-swift - iOS/macOS (Swift) integrationauth0-fastapi-api - FastAPI API authenticationauth0-aspnetcore-authentication - ASP.NET Core web app authenticationauth0-aspnetcore-api - ASP.NET Core API authenticationauth0-mfa - Multi-Factor Authentication原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。