用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/G1Joshi/Agent-Skills --skill auth0命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | auth0 |
| description | Auth0 identity platform. Use for authentication. |
Auth0 is a platform for authentication and authorization. It provides a Universal Login page that handles the complexity of authentication protocols (SAML, OIDC, OAuth) and identity providers (Google, Enterprise, Database).
npm install @auth0/nextjs-auth0
// page/api/auth/[...auth0].js
import { handleAuth } from '@auth0/nextjs-auth0';
export default handleAuth();
// Component
import { useUser } from '@auth0/nextjs-auth0/client';
export default function Profile() {
const { user, error, isLoading } = useUser();
if (isLoading) return <div>Loading...</div>;
if (user) return <div>Welcome {user.name}</div>;
return <a href="/api/auth/login">Login</a>;
}
Redirects user to your-tenant.auth0.com. Secure, centralized, and hosted by Auth0. Avoids "Embedded Login" (inputs on your own page) for better security against credential stuffing.
Serverless functions that execute during the auth pipeline.
Do:
auth.myapp.com) to avoid 3rd party cookie issues.Don't:
| Error | Cause | Solution |
|---|---|---|
Callback URL mismatch | Redirect URI not in dashboard. | Add http://localhost:3000/api/auth/callback to Allowed Callback URLs. |
CORS | Calling API from SPA. | Configure Allowed Origins and Web Origins. |