Loading...
Loading...
Compare original and translation side by side
auth0-quickstartauth0-quickstart| Pattern | Indicates |
|---|---|
| Firebase Auth |
| Existing auth hooks |
| Passport.js |
| OAuth/OIDC |
| Token-based auth |
| Auth routes |
I detected existing authentication in your project. Are you:
- Migrating to Auth0 (replace existing auth)
- Adding Auth0 alongside (keep both temporarily)
- Starting fresh (remove old auth, new Auth0 setup)
| 模式 | 对应提供商 |
|---|---|
| Firebase Auth |
| 现有自定义认证钩子 |
| Passport.js |
| OAuth/OIDC |
| 基于Token的认证 |
| 认证路由 |
我在您的项目中检测到了现有身份认证功能。您是否需要:
- 迁移至Auth0(替换现有认证系统)
- 同时添加Auth0(暂时保留两者)
- 全新开始(移除旧认证系统,搭建新的Auth0环境)
undefinedundefined
**For detailed instructions:**
- [User JSON Format](references/user-import.md#auth0-user-import-format)
- [Password Hash Algorithms](references/user-import.md#password-hash-algorithms)
- [Import Methods](references/user-import.md#importing-to-auth0)
- [Monitoring Import Progress](references/user-import.md#monitoring-import-progress)
- [Common Import Errors](references/user-import.md#common-import-errors)
---
**详细说明请参见:**
- [用户JSON格式](references/user-import.md#auth0-user-import-format)
- [密码哈希算法](references/user-import.md#password-hash-algorithms)
- [导入方法](references/user-import.md#importing-to-auth0)
- [监控导入进度](references/user-import.md#monitoring-import-progress)
- [常见导入错误](references/user-import.md#common-import-errors)
---auth0-reactauth0-nextjsauth0-vueauth0-angularauth0-expressauth0-react-nativeauth0-reactauth0-nextjsauth0-vueauth0-angularauth0-expressauth0-react-nativehttps://YOUR_TENANT.auth0.com/https://YOUR_TENANT.auth0.com/.well-known/jwks.jsonhttps://YOUR_TENANT.auth0.com/https://YOUR_TENANT.auth0.com/.well-known/jwks.json// Support both providers during migration
const getUser = async () => {
// Try Auth0 first
const auth0User = await getAuth0User();
if (auth0User) return auth0User;
// Fall back to legacy provider
return await getLegacyUser();
};// Support both providers during migration
const getUser = async () => {
// Try Auth0 first
const auth0User = await getAuth0User();
if (auth0User) return auth0User;
// Fall back to legacy provider
return await getLegacyUser();
};| Issue | Solution |
|---|---|
| Password hashes incompatible | Use Auth0 custom DB connection with lazy migration |
| Social logins don't link | Configure same social connection, users auto-link by email |
| Custom claims missing | Add claims via Auth0 Actions |
| Token format different | Update API to validate RS256 JWTs with Auth0 issuer |
| Session persistence | Auth0 uses rotating refresh tokens; update token storage |
| Users must re-login | Expected for redirect-based auth; communicate to users |
| 问题 | 解决方案 |
|---|---|
| 密码哈希不兼容 | 使用Auth0自定义数据库连接并结合惰性迁移 |
| 社交登录无法关联 | 配置相同的社交连接,用户将通过邮箱自动关联 |
| 缺少自定义声明 | 通过Auth0 Actions添加声明 |
| 令牌格式不同 | 更新API以验证带有Auth0签发者的RS256 JWT |
| 会话持久化 | Auth0使用轮换刷新令牌;更新令牌存储方式 |
| 用户必须重新登录 | 基于重定向的认证会出现此情况;提前告知用户 |
auth0-quickstartauth0-quickstartauth0-reactauth0-nextjsauth0-vueauth0-angularauth0-expressauth0-react-nativeauth0-reactauth0-nextjsauth0-vueauth0-angularauth0-expressauth0-react-native