前端安装
- 作者仓库星标 0
- 许可证 Proprietary
- 作者更新于 实时读取
- 作者仓库 skills-registry
- 领域
- AI 智能
- 兼容 Agent
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- 信任分
- 94 / 100 · 已通过审计
- 作者 / 版本 / 许可
- @tomevault-io · Proprietary
- Token 消耗评级
- 低消耗
- 接入复杂程度
- 即装即用
- 是否需要外部 API Key
- 不需要
- 兼容的系统
- macOS · Linux · Windows
- 底层运行要求
- 无特殊要求
- 文件与系统权限
-
- 只读
- 允许写入 / 修改
- 网络行为
- 仅限本地
- 安装命令数
- 26 条
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: auth0-expo
description: Use when adding authentication to Expo (React Native) mobile apps — login, logout, user sessions…
category: AI 智能
runtime: 无特殊运行时
---
# auth0-expo 输出预览
## PART A: 任务判断
- 适用问题:提示词、Agent 工作流、模型评估或自动化推理。
- 输入要求:目标材料、限制条件、期望输出和验收方式。
- 证据边界:围绕“Prerequisites / When NOT to Use / Quick Start Workflow”读取原文规则,不把推断写成作者承诺。
## PART B: 执行结果
- **01** 任务判断:确认你的需求是否属于提示词、Agent 工作流、模型评估或自动化推理,并标出输入、限制和预期结果。
- **02** 执行计划:优先按“Prerequisites / When NOT to Use / Quick Start Workflow”拆成步骤,说明每一步会读取什么、修改什么、产出什么。
- **03** 交付结果:给出可复制的命令、文件改动、检查清单或内容草稿,并说明如何继续迭代。
- **04** 风险边界:结合 读取文件、写入/修改文件、主要在本地完成、通常不需要额外 API Key 给出执行前确认项。
## Running Rules
- 读取文件、写入/修改文件;主要在本地完成;通常不需要额外 API Key。
- 先小样例验证,再放大到真实任务。
- 交付时同时给结果、检查口径和下一步迭代建议。 原文没有稳定的斜杠命令要求。安装验证后通常全局生效,直接在对话里点名这个 Skill 并描述任务即可。
告诉 Agent 目标文件或材料、期望结果、不可改范围、是否允许联网或执行命令。本 Skill 的权限画像是:读取文件、写入/修改文件。
先用一个小任务确认它会围绕“Prerequisites / When NOT to Use / Quick Start Workflow”工作;涉及文件或命令时,先看 diff、日志、预览或测试结果。
检查最终产物是否包含明确结果、必要证据和下一步动作;如果输出泛泛而谈,就补充输入、边界和验收标准后重跑。
---
name: auth0-expo
description: Use when adding authentication to Expo (React Native) mobile apps — login, logout, user sessions…
category: AI 智能
source: tomevault-io/skills-registry
---
# auth0-expo
## 什么时候使用
- 把 AI / Agent方向的常用动作沉淀成 Agent 可调用的技能 适合处理AI Agent、提示词、模型评估与自动化推理,核心价值是把输入、判断、执行、验证和交付边界固定下来,避免 Agent 泛泛回答。 把任务拆成可执行、可检查…
- 面向提示词、Agent 工作流、模型评估或自动化推理,优先处理能明确输入、步骤和验收标准的工作。
## 需要提供什么
- 目标材料、目录范围、期望结果和不可改动内容。
- 是否允许联网、执行命令、读写文件或调用外部服务。
## 执行规则
- 围绕「Prerequisites / When NOT to Use / Quick Start Workflow」组织步骤,不把推断写成作者事实。
- 读取文件、写入/修改文件;主要在本地完成;通常不需要额外 API Key。
- 先跑小样例,确认结果可检查后再扩大任务范围。
## 输出要求
- 给出最终产物、关键证据、验证方式和下一步动作。
- 信息不足时标记 unknown,不编造命令、平台或依赖。 作者原文负责流程事实;仓库文件负责来源和命令;流狐只补充适用场景、限制和质量判断。
skill "auth0-expo" {
输入层 -> 用户目标 + 目标文件 + 禁止范围 + 验收标准
上下文层 -> Prerequisites / When NOT to Use / Quick Start Workflow
规则层 -> SKILL.md 触发条件 / 执行顺序 / 输出格式
运行层 -> 无特殊运行时 | 读取文件、写入/修改文件 | 主要在本地完成
安全层 -> 通常不需要额外 API Key + 小任务验证 + diff / 日志复核
输出层 -> 可复制结果 + 检查清单 + 下一步迭代
} Auth0 Expo Integration
Add authentication to Expo (React Native) applications using react-native-auth0 with the Expo Config Plugin.
Prerequisites
- Expo SDK 53 or higher (react-native-auth0 v5.x requires Expo 53+)
- React 19 and React Native 0.78.0 or higher
- Auth0 account with a Native application configured
- If Auth0 is not set up yet, use the
auth0-quickstartskill first - Not compatible with Expo Go — requires custom development client or EAS Build
When NOT to Use
| Use Case | Recommended Skill |
|---|---|
| Bare React Native CLI project (no Expo) | auth0-react-native |
| React web SPA (Vite/CRA) | auth0-react |
| Next.js application | auth0-nextjs |
| Vue.js SPA | auth0-vue |
| Angular SPA | auth0-angular |
| Express.js backend | auth0-express |
| Native Android (Kotlin/Java) | auth0-android |
| Backend API (JWT validation) | auth0-fastify-api or auth0-express |
Quick Start Workflow
1. Configure Auth0
For automated setup with Auth0 CLI, see Setup Guide for complete scripts.
For manual setup, configure a Native application in the Auth0 Dashboard and note your Domain and Client ID.
2. Verify Expo Dev Client
Agent instruction: Before installing the Auth0 SDK, check if the project has
expo-dev-clientinstalled. Read the project'spackage.jsonand look forexpo-dev-clientindependenciesordevDependencies.
If
expo-dev-clientis found: Proceed to step 3.If
expo-dev-clientis NOT found: UseAskUserQuestionwith the following message:"The
react-native-auth0SDK requires a custom Expo development client — it does not work with Expo Go. Your project does not haveexpo-dev-clientinstalled.How would you like to proceed?
- Install it for me — I'll run
npx expo install expo-dev-clientand continue setup- I'll set it up myself — skip this step and continue to Auth0 SDK installation"
If the user picks option 1, run:
npx expo install expo-dev-clientThen proceed to step 3. If option 2, proceed to step 3 directly.
3. Install SDK
npx expo install react-native-auth0
4. Configure Expo Config Plugin
Add the react-native-auth0 plugin to app.json (or app.config.js) with your Auth0 domain and a custom scheme. Also ensure bundleIdentifier (iOS) and package (Android) are set:
{
"expo": {
"ios": { "bundleIdentifier": "com.yourcompany.yourapp" },
"android": { "package": "com.yourcompany.yourapp" },
"plugins": [
["react-native-auth0", {
"domain": "YOUR_AUTH0_DOMAIN",
"customScheme": "YOUR_CUSTOM_SCHEME"
}]
]
}
}
The customScheme must be all lowercase with no special characters (e.g., auth0sample). See Setup Guide for HTTPS callbacks, multiple domains, EAS Build, and secret management.
5. Configure Callback URLs
Add to Allowed Callback URLs and Allowed Logout URLs in the Auth0 Dashboard:
YOUR_CUSTOM_SCHEME://YOUR_AUTH0_DOMAIN/ios/YOUR_BUNDLE_ID/callback,
YOUR_CUSTOM_SCHEME://YOUR_AUTH0_DOMAIN/android/YOUR_PACKAGE/callback
All values must be lowercase with no trailing slash. For HTTPS callback URLs (App Links / Universal Links), see Setup Guide.
6. Add Authentication with Auth0Provider
Wrap your app with Auth0Provider and use the useAuth0 hook:
Agent instruction: Before adding new UI elements, search the project for existing click handlers for login, logout, sign-in, or sign-out buttons. If existing handlers are found, hook the Auth0 code into them. Only create new buttons if no existing handlers are found.
import React from 'react';
import { Auth0Provider, useAuth0 } from 'react-native-auth0';
import { View, Button, Text, ActivityIndicator } from 'react-native';
function HomeScreen() {
const { authorize, clearSession, user, isLoading, error } = useAuth0();
const login = async () => {
try {
await authorize(
{ scope: 'openid profile email' },
{ customScheme: 'YOUR_CUSTOM_SCHEME' }
);
} catch (e) {
console.error('Login error:', e);
}
};
const logout = async () => {
try {
await clearSession({ customScheme: 'YOUR_CUSTOM_SCHEME' });
} catch (e) {
console.error('Logout error:', e);
}
};
if (isLoading) {
return <ActivityIndicator size="large" />;
}
return (
<View>
{user ? (
<>
<Text>Welcome, {user.name}!</Text>
<Text>{user.email}</Text>
<Button title="Log Out" onPress={logout} />
</>
) : (
<Button title="Log In" onPress={login} />
)}
{error && <Text>{error.message}</Text>}
</View>
);
}
export default function App() {
return (
<Auth0Provider
domain="YOUR_AUTH0_DOMAIN"
clientId="YOUR_AUTH0_CLIENT_ID"
>
<HomeScreen />
</Auth0Provider>
);
}
7. Build & Verify
Agent instruction: After completing the integration, build the project to verify it compiles:
npx expo prebuild --clean npx expo run:ios # or npx expo run:androidIf the build fails, analyze the error output. Common integration build failures include:
- "Invariant Violation: Native module cannot be null": Using Expo Go instead of a development build — run
npx expo run:iosornpx expo run:androidinstead ofnpx expo start- Plugin not applied: Missing
react-native-auth0in app.json plugins array — verify the plugin configuration- Pod install fails (iOS): Run
npx expo prebuild --cleanto regenerate native projects- Manifest merge failure (Android): Conflicting auth0Domain placeholder — ensure only the config plugin sets the domain
Re-run the build after each fix. Track the number of build-fix iterations.
Failcheck: If the build still fails after 5–6 fix attempts, stop and ask the user using
AskUserQuestion: "The build is still failing after several fix attempts. How would you like to proceed?"
- Let the skill continue fixing iteratively
- Fix it manually — show the remaining errors
- Skip build verification — proceed without a successful build
Detailed Documentation
- Setup Guide — Dev client requirement, automated setup, Expo config plugin, callback URLs, EAS Build, secret management
- Integration Patterns — Login/logout, credential management, biometric auth, token refresh, organizations, DPoP, error handling
- API Reference & Testing — Configuration options, useAuth0 hook API, testing checklist, common issues, security
Common Mistakes
| Mistake | Fix |
|---|---|
| Using Expo Go instead of development build | react-native-auth0 requires native code. Use npx expo run:ios / npx expo run:android or create a development build with EAS. |
Missing customScheme in authorize/clearSession calls |
Pass { customScheme: 'your-scheme' } as the second argument to authorize() and clearSession(). Must match the value in app.json plugin config. |
| Callback URL mismatch | Ensure callback URL is all lowercase, no trailing slash, and matches Auth0 Dashboard exactly: {customScheme}://{domain}/ios/{bundleId}/callback |
| App type not set to Native | The Auth0 application must be type Native in the Dashboard, not SPA or Regular Web. |
| Missing bundleIdentifier or package in app.json | Both expo.ios.bundleIdentifier and expo.android.package must be set in app.json for callback URLs to work. |
| Forgot to wrap app with Auth0Provider | All components using useAuth0() must be children of Auth0Provider. |
| Using react-native-auth0 v5.x with Expo < 53 | Version 5.x requires Expo 53+. Use v4.x for older Expo versions. |
| Not testing on physical device | Biometric authentication (Face ID, fingerprint) only works on a physical device, not simulators. Always test the full auth flow on a real device before release. |
Related Skills
- auth0-quickstart — Set up an Auth0 account and application
- auth0-react-native — Bare React Native CLI projects
- auth0-mfa — Configure multi-factor authentication
- auth0-cli — Manage Auth0 resources from the terminal
References
- Auth0 Expo Quickstart
- react-native-auth0 GitHub Repository
- react-native-auth0 API Documentation
- Expo Sample App
- EXAMPLES.md
Source: auth0/agent-skills — distributed by TomeVault.
先判断是否适合
作者设计意图
作者的方法与取舍
边界和复核