# @auth0/auth0-acul-react 中文文档

规范地址：https://npmcn.com/package/%40auth0/auth0-acul-react/

版本：1\.11\.0
npm 元数据更新时间：2026-11-05T08:39:08.402Z
中文译文更新时间：2026-11-07T05:50:49.134Z
软件包许可：MIT

本文由上游 README 翻译，可能存在偏差，请结合原文核对 API、命令与配置。版权与许可归原作者所有。

原始 npm 页面：https://www.npmjs.com/package/%40auth0/auth0-acul-react
原文对照：https://npmcn.com/package/%40auth0/auth0-acul-react/?lang=original
项目主页：https://github.com/auth0/universal-login/tree/master#readme
源码仓库：https://github.com/auth0/universal-login#master

## 关键信息（来自 npm 元数据）

- 包体积（解压后）：562 kB，299 个文件
- 模块格式：ES Module
- TypeScript 类型：包内自带
- 运行依赖：1 个
- peer 依赖：react \>=18\.0\.0，react-dom \>=18\.0\.0
- 首次发布：2025-10-13T18:55:58.407Z
- 最新版本发布：2026-11-05T08:39:08.073Z
- 近 30 天下载量：511093（2026-10-07 至 2026-11-05，npm 官方下载统计）
- 已发布版本数：17（近 12 个月 14 个）

## 中文简介

Auth0 ACUL React SDK 使您能够构建带有React switch和组件的通用登录的高级自定义.

## 安装

```sh
npm install @auth0/auth0-acul-react
```

也可以使用：`pnpm add @auth0/auth0-acul-react`、`yarn add @auth0/auth0-acul-react`、`bun add @auth0/auth0-acul-react`

## README

# Auth0 ACUL 反应 SDK

![ACUL React SDK](https://cdn.auth0.com/website/sdks/banners/auth0-acul-react-banner.png)

[![NPM Version](https://img.shields.io/npm/v/@auth0/auth0-acul-react)](https://www.npmjs.com/package/@auth0/auth0-acul-react) [![Downloads](https://img.shields.io/npm/dw/@auth0/auth0-acul-react)](https://www.npmjs.com/package/@auth0/auth0-acul-react) [![codecov](https://codecov.io/gh/auth0/auth0-acul-react/branch/main/graph/badge.svg)](https://codecov.io/gh/auth0/auth0-acul-react) [![License](https://img.shields.io/badge/License-MIT-blue.svg?style=flat)](https://opensource.org/licenses/MIT)

📚 [文档](https://npmcn.com/package/%40auth0/auth0-acul-react/#readme-documentation) | [开始](https://npmcn.com/package/%40auth0/auth0-acul-react/#readme-getting-started) | [API 参考](https://npmcn.com/package/%40auth0/auth0-acul-react/#readme-api-reference) | [钩子](https://npmcn.com/package/%40auth0/auth0-acul-react/#readme-hooks) | [实例](https://npmcn.com/package/%40auth0/auth0-acul-react/#readme-examples) | [反馈](https://npmcn.com/package/%40auth0/auth0-acul-react/#readme-feedback)

使用 Auth0 通用登录的开发者可以使用这个 React SDK 来自定义诸如登录,注册,或重置密码等屏幕. 它提供钩子,上下文,和公用设施,以构建与你的品牌相匹配的灵活,类型安全的经验,并提供无缝的用户体验.

* * *

## 页:1

-   [快速启动](https://auth0.com/docs/customize/login-pages/advanced-customizations/getting-started/sdk-quickstart) - 我们的指南设置 SDK 在你的应用程序.
-   [指南](https://auth0.com/docs/customize/login-pages/advanced-customizations/screens) - 更多常见案例指南
-   [实例](https://github.com/auth0/universal-login/tree/master/packages/auth0-acul-react/examples) - 不同定制用途的代码片段.

## 开始

### 先决条件

在开始前,确保您有以下设置:

1.  **自定义域**: 确保为您的 Auth0 租户配置自定义域 .
2.  **屏幕配置**: 在您的 Auth0 流中设置所需的认证屏幕 .  
    关于详细步骤,请参见 [配置 ACUL 屏幕](https://auth0.com/docs/customize/login-pages/advanced-customizations/getting-started/configure-acul-screens)。 。 。 .

### 安装

```bash
npm install @auth0/auth0-acul-react
```

同伴依赖 :

```bash
npm install react
```

### 导入 SDK

SDK 支持 `partial imports` 对于每个屏幕,允许您只包含您特定使用大小写所需的代码。 这有助于保持你的捆绑尺寸并改进性能.

而且,你可以使用一个 `root import` 如果您的应用程序需要, 可以装入单个捆绑的所有屏幕 .

#### 部分导入

每个屏幕都有自己的一套钩子和方法. 您只能导入您正在建设的屏幕所需的内容 .

以下示例显示如何导入和使用 SDK 构建 `login-id` 屏幕.

```tsx
import { 
  // Context hooks
  useUser,
  useTenant,
  useBranding,
  useClient,
  useOrganization,
  usePrompt,
  useScreen,
  useTenant,
  useTransaction,
  useUser,
  useUntrustedData,
  // Common hooks
  useErrors,
  useTexts,
  // Utility hooks
  useUsernameValidation,
  usePasswordValidation,
  useLoginIdentifiers,
  // Submit methods
  login,
  passkeyLogin,
  federatedLogin,
} from '@auth0/auth0-acul-react/login-id';
```

* * *

#### 根导入

SDK也支持根导入,这样可以让您从一捆装入所有屏幕. 如果您的应用程序根据当前 Auth0 流量在运行时动态地使不同的屏幕运行,例如,当您想要一个能够处理所有可能屏幕的统一构建时,此功能是有用的 .

但对于大多数项目来说. 如果您只需要特定的屏幕, 请使用部分导入来改进性能 .

```ts
import {
  // Common hooks
  useCurrentScreen,
  useAuth0Themes,
  useErrors,

  // Screen-specific hooks for multiple screens
  useLoginId,
  useSignupId,
  useResetPassword
} from '@auth0/auth0-acul-react';
```

* * *

#### 类型/ 接口

类型和接口可以从 `@auth0/auth0-acul-react/types` 安全型和更好的DX.

```tsx
import type {
  Connection,
  CustomOptions,
  IdentifierType,
  Organizations,
  EnrolledDevice
  // ...other types
} from '@auth0/auth0-acul-react/types';
```

参考我们 [API 参考](https://npmcn.com/package/%40auth0/auth0-acul-react/#readme-api-reference) 对于可用的类型和接口的完整列表.

* * *

## API 参考

### 屏幕

| 没有. | 提示 | 屏幕名称 | 文档链接 |
| --- | --- | --- | --- |
| 1个 | 登录 | 登录 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.login.html) |
| 2个 | 登录编号 | 登录编号 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.login-id.html) |
| 3个 | 登录密码字 | 登录密码字 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.login-password.html) |
| 页:1 | 注册编号 | 注册编号 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.signup-id.html) |
| 页:1 | 注册密码 | 注册密码 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.signup-password.html) |

探索更多屏幕...

| 没有. | 提示 | 屏幕名称 | 文档链接 |
| --- | --- | --- | --- |
| 6个 | 无密码登录 | 登录无密码电子邮件编码 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.login-passwordless-email-code.html) |
| 第7条 | 无密码登录 | 登录无密码- sms- otp | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.login-passwordless-sms-otp.html) |
| 第8条 | 密码 | 钥匙注册 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.passkey-enrollment.html) |
| 第9条 | 密码 | 密码录入- 本地 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.passkey-enrollment-local.html) |
| 10个 | 电话识别器注册 | 电话识别器注册 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.phone-identifier-enrollment.html) |
| 第11个 | 电话识别-质疑 | 电话识别-质疑 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.phone-identifier-challenge.html) |
| 第12条 | 电子邮件识别器质疑 | 电子邮件识别器质疑 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.email-identifier-challenge.html) |
| 第13条 | 夹克 | 间歇式控制 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.interstitial-captcha.html) |
| 页:1 | 重置密码字 | 重置密码电子邮件 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.reset-password-email.html) |
| 15个 | 重置密码字 | 重置密码字请求 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.reset-password-request.html) |
| 16个 | 重置密码字 | 重置密码字 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.reset-password.html) |
| 页:1 | 重置密码字 | 重置密码 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.reset-password-error.html) |
| 第 18 条 | 重置密码字 | 重置密码- 成功 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.reset-password-success.html) |
| 第 19 条 | 注册 | 注册 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.signup.html) |
| 20国 | 玛法 | mfa- detect-浏览器能力 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-detect-browser-capabilities.html) |
| 21国 | 玛法 | mfa 滚动结果 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-enroll-result.html) |
| 22个 | 玛法 | mfa - 开始滚动 - 选项 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-begin-enroll-options.html) |
| 第23条 | 玛法 | mfa 登录选项 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-login-options.html) |
| 24个 | 闪电 | mfa-push-enrollment-qr (法语) | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-push-enrollment-qr.html) |
| 第25条 | 闪电 | 法-普-欢迎 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-push-welcome.html) |
| 第 26 条 | 闪电 | mfa-push-挑战-push | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-push-challenge-push.html) |
| 27个 | 闪电 | 缩写列表 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-push-list.html) |
| 第28条 | mfa-sms (英语) | mfa 国家代码 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-country-codes.html) |
| 29个 | mfa-sms (英语) | mfa - sms - 挑战 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-sms-challenge.html) |
| 30个 | mfa-sms (英语) | mfa - sms - 注册 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-sms-enrollment.html) |
| 31个 | mfa-sms (英语) | mfa - sms - 列表 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-sms-list.html) |
| 第32条 | 电子邮件 | 电子邮件挑战 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-email-challenge.html) |
| 33个 | 电子邮件 | 电子邮件列表 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-email-list.html) |
| 页:1 | 维塔蒂诺 | 接受邀请 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.accept-invitation.html) |
| 35个 | 组织 | 组织选择者 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.organization-picker.html) |
| 第36条 | 组织 | 组织选择 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.organization-selection.html) |
| 页:1 | 重置密码字 | mfa-otp-挑战 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-otp-challenge.html) |
| 第38条 | 缩写 | mfa-otp- 注册码 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-otp-enrollment-code.html) |
| 页:1 | 缩写 | mfa-otp-enrollment-qr (法语) | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-otp-enrollment-qr.html) |
| 第40条 | 重置密码字 | 重置密码-mfa-电子邮件-质疑 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.reset-password-mfa-email-challenge.html) |
| 第41条 | 重置密码字 | 重置- 密码- mfa- push- 挑战- push | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.reset-password-mfa-push-challenge-push.html) |
| 第42条 | 重置密码字 | mfa - sms - 挑战 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.reset-password-mfa-sms-challenge.html) |
| 第43条 | 重置密码字 | 重置密码- mfa- otp- 挑战 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.organization-selection.html) |
| 第44条 | 麦克风 | 移动电话注册 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-phone-enrollment.html) |
| 第45条 | mfa 语音 | mfa 语音注册 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-voice-enrollment.html) |
| 第46条 | mfa - 恢复代码 | mfa-恢复-代码挑战 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-recovery-code-challenge.html) |
| 第47条 | 设备流量 | 设备编码-激活-分配 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.device-code-activation-allowed.html) |
| 第48条 | 设备流量 | 设备编码-激活-拒绝 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.device-code-activation-denied.html) |
| 第49条 | 设备流量 | 设备编码激活 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.device-code-activation.html) |
| 第50条 | 重置密码字 | 重置密码-mfa-回收-代码-挑战 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.reset-password-mfa-recovery-code-challenge.html) |
| 51国 | 重置密码字 | 重置密码- mfa- voice | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.reset-password-mfa-voice-challenge.html) |
| 第52条 | 常见 | 赎回盘 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.redeem-ticket.html) |
| 第53条 | 设备流量 | 设备编码确认 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.device-code-confirmation.html) |
| 页:1 | 麦克风 | 手机挑战 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-phone-challenge.html) |
| 第55条 | mfa 语音 | mfa - 语音挑战 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-voice-challenge.html) |
| 页:1 | mfa - 恢复代码 | mfa - 恢复- 代码注册 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-recovery-code-enrollment.html) |
| 页:1 | 重置密码字 | 重设密码-mfa-手机挑战 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.reset-password-mfa-phone-challenge.html) |
| 页:1 | mfa - 恢复代码 | mfa - 恢复 - 代码 - 挑战 - 新代码 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-recovery-code-challenge-new-code.html) |
| 59国 | 登录 | 登录 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.logout.html) |
| 页:1 | 登录 | 已注销 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.logout-aborted.html) |
| 页:1 | 登录 | 登录完成 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.logout-complete.html) |
| 第62条 | 电子邮件核查 | 电子邮件核查结果 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.email-verification-result.html) |
| 页:1 | 登录电子邮件核查 | 登录电子邮件核查 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.login-email-verification.html) |
| 64国道 | mfa-webauthn (英语) | mfa-webauthn-平台的注册 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-webauthn-platform-enrollment.html) |
| 65个 | mfa-webauthn (英语) | mfa-webauthn-error (英语) | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-webauthn-error.html) |
| 页:1 | mfa-webauthn (英语) | mfa-webauthn-roaming-information 互联网档案馆的存檔,存档日期2013-12-02 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-webauthn-roaming-enrollment.html) |
| 67国道 | mfa-webauthn (英语) | mfa-webauthn-roamming-挑战 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-webauthn-roaming-challenge.html) |
| 68国 | mfa-webauthn (英语) | mfa-webauthn-平台-挑战 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-webauthn-platform-challenge.html) |
| 第69条 | mfa-webauthn (英语) | mfa-webauthn - 注册 - 成功 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-webauthn-enrollment-success.html) |
| 70个 | mfa-webauthn (英语) | mfa-webauthn-change-key-昵称 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-webauthn-change-key-nickname.html) |
| 页:1 | mfa-webauthn (英语) | mfa -webauthn - 不可用 - 错误 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-webauthn-not-available-error.html) |
| 72国 | 重置密码字 | 重置密码-mfa-webauthn-平台-挑战 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.reset-password-mfa-webauthn-platform-challenge.html) |
| 73国 | 重置密码字 | 重设密码-mfa-webauthn-roaming-challenge(英语: | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.reset-password-mfa-webauthn-roaming-challenge.html) |
| 第74条 | 同意书 | 同意书 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.consent.html) |
| 第75条 | 定制同意 | 定制同意 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.customized-consent.html) |
| 第76条 | 电子邮件 | 电子邮件 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.email-otp-challenge.html) |
| 77国 | 确认 | 确认 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.confirmation.html) |
| 78国 | 同意书 | 尚待同意 | [链接](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.pending-consent.html) |
|  |

* * *

## 钩子

### 上下文钩 (在所有屏幕中都可用)

-   `useUser()` - 当前用户信息
-   `useTenant()` - 租户配置
-   `useClient()` - 应用程序客户端信息
-   `useScreen()` - 当前屏幕数据和配置
-   `useTransaction()` - 交易状态和方法
-   `useBranding()` - 租户品牌和主题
-   `useOrganization()` - 组织背景(如适用)
-   `usePrompt()` - 当前认证提示
-   `useUntrustedData()` - 来自认证流程的不信任数据
-   `useExperiment()` - 当前屏幕的主动实验中心实验(`experimentId`, (中文(简体) ), `variationId`, (中文(简体) ), `variationName`, (中文(简体) ), `variationDescription`, (中文(简体) ), `config`, (中文(简体) ), `isControl`),或 `null` 当没有实验活动或屏幕没有选择通过 `context_configuration`

#### 在特定屏幕上可用

-   `useCountryCodes()` - 可用的电话国家代码和建议的默认值。 只从 `login`, (中文(简体) ), `login-id`, (中文(简体) ), `signup`,以及 `signup-id`。 。 。 .

### 工具钩

用于形式验证、投票和标识管理的专门钩:

#### 标识管理

-   `useLoginIdentifiers()` - 获取可用的登录标识类型(电子邮件、电话、用户名)
-   `useSignupIdentifiers()` - 获得可用的注册标识类型,每个类型都有其 `required` 状态

#### 表格验证

-   `usePasswordValidation(password, rules)` - 实时密码强度验证
-   `useUsernameValidation(username)` - 用户名格式和可用性验证

#### 外交部投票

-   `useMfaPolling(options)` - 管理外务省推动通知投票周期(以及投票同意结果) `pending-consent`(中文(简体) )
-   `useResend(options)` - 用冷却计时器处理再发送操作

### 常见钩子

所有屏幕上可用的通用钩:

#### 屏幕管理

-   `useCurrentScreen()` - 获得完整的当前屏幕上下文数据
-   `useAuth0Themes()` - 登录租户品牌和主题配置

#### 处理错误

-   `useErrors(options)` - 有分类的全面错误管理
    -   通过出错类型过滤 : `'validation'`, (中文(简体) ), `'auth0'`, (中文(简体) ), `'configuration'`
    -   通过字段名称过滤窗体特定错误
    -   个别解雇或所有错误

### 屏幕特定行动方法

每个屏幕模块导出屏幕动作的方法 :

```tsx
// Login ID Screen
import {
  loginMethod,
  continueWithFederatedLogin
} from '@auth0/auth0-acul-react/login-id';

// Password Screen
import {
  loginMethod,
  forgotPasswordMethod
} from '@auth0/auth0-acul-react/login-password';

// MFA Push Challenge
import {
  continueMethod,
  resendPushNotification,
  useMfaPolling
} from '@auth0/auth0-acul-react/mfa-push-challenge-push';
```

## 实例

-   [反应示例](https://github.com/auth0/universal-login/tree/master/packages/auth0-acul-react/examples) - 完整的反应组件示例
-   [反应布尔普拉特](https://github.com/auth0/auth0-acul-react-boilerplate) - 全面反应应用程序模板

* * *

## \* 反馈

### 捐款

我们赞赏反馈和对这次再投资的贡献! 在开始前,请参看以下内容:

-   [Auth0的一般贡献准则](https://github.com/auth0/open-source-template/blob/master/GENERAL-CONTRIBUTING.md)
-   [Auth0 行为守则准则](https://github.com/auth0/open-source-template/blob/master/CODE-OF-CONDUCT.md)

### 提出问题

请提供反馈或报告错误 [提出我们的问题追踪器](https://github.com/auth0/universal-login/issues)。 。 。 .

### 脆弱性报告

请不要在公共 GitHub 问题跟踪器上报告安全漏洞 。 这个 [负责任的披露程序](https://auth0.com/responsible-disclosure-policy) 详细说明披露安全问题的程序.

* * *

![Auth0 Logo](https://cdn.auth0.com/website/sdks/logos/auth0_light_mode.png)

Auth0是一个易于执行,可适应的认证和授权平台. 学习更多退房 [为什么是Auth0?](https://auth0.com/why-auth0)

这个项目根据麻省理工学院的许可证获得许可。 见 [自由主义](https://github.com/auth0/auth0.js/blob/master/LICENSE) 需要更多信息的文件.

## 常见问题

### @auth0/auth0-acul-react 是什么？

Auth0 ACUL React SDK 使您能够构建带有React switch和组件的通用登录的高级自定义\.

### 如何安装 @auth0/auth0-acul-react？

在项目目录运行 npm install @auth0/auth0-acul-react，或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖：react（\>=18\.0\.0）、react-dom（\>=18\.0\.0）。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖，Yarn 需要手动安装。

### @auth0/auth0-acul-react 支持 TypeScript 吗？

支持。包内自带 TypeScript 类型声明（package\.json 声明了 types 入口），安装后即可获得类型提示，无需再安装 @types 包。

### @auth0/auth0-acul-react 支持 ESM 还是 CommonJS？

以 ES Module 形式发布，推荐使用 import 引入。在 CommonJS 项目中，Node\.js 20\.19\+ / 22\.12\+ 可以直接 require\(\) 不含顶层 await 的 ES Module，更早的版本需要改用动态 import\(\)。

### @auth0/auth0-acul-react 可以商用吗？

@auth0/auth0-acul-react 使用 MIT 许可。宽松许可：允许商业使用、修改和再分发，通常只需在分发时保留原版权与许可声明。以上为概括，不构成法律意见，请以许可原文为准。

### @auth0/auth0-acul-react 的下载量有多少？

根据 npm 官方下载统计，@auth0/auth0-acul-react 在 2026/10/07 – 2026/11/05 这 30 天内被下载 511,093 次，日均约 17,036 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入，适合横向比较热度，不能直接等同于使用人数。

### @auth0/auth0-acul-react 还在维护吗？

最新版本 1\.11\.0 发布于 2026/11/05（2 天前）；至今共发布 17 个版本，其中过去 12 个月发布了 14 个；首次发布于 2025/10/14。发布频率只是参考信号：功能稳定的工具可能很少需要更新，建议结合源码仓库的 issue 和提交记录判断。

