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

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

版本：1\.11\.0
npm 元数据更新时间：2026-11-05T07:46:55.644Z
中文译文更新时间：2026-11-07T05:47:41.578Z
软件包许可：MIT

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

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

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

- 包体积（解压后）：1.9 MB，1321 个文件
- 模块格式：ES Module
- TypeScript 类型：包内自带
- Node.js 要求：\>=18
- 运行依赖：0 个
- 首次发布：2024-12-06T11:55:34.178Z
- 最新版本发布：2026-11-05T07:46:55.230Z
- 近 30 天下载量：795901（2026-10-07 至 2026-11-05，npm 官方下载统计）
- 已发布版本数：30（近 12 个月 14 个）

## 中文简介

Auth0 ACUL JS SDK 允许您与全域登录的高级自定义工作.

## 安装

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

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

## README

# Auth0 ACUL JS SDK (英语)

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

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

📚 [文档](https://npmcn.com/package/%40auth0/auth0-acul-js/#readme-documentation) - 🚀 [开始](https://npmcn.com/package/%40auth0/auth0-acul-js/#readme-getting-started) - 💻 [API 参考](https://npmcn.com/package/%40auth0/auth0-acul-js/#readme-api-reference) - 说吧 [帮助函数](https://npmcn.com/package/%40auth0/auth0-acul-js/#readme-helper-functions) - 💬 [反馈](https://npmcn.com/package/%40auth0/auth0-acul-js/#readme-feedback)

这个 **Auth0 ACUL JS SDK (英语)** 允许您与 Universal 登录的高级自定义工作.

它简化了将认证屏幕(登录,签注,无密码,密码录入等)整合到您的网络应用中,为无缝执行提供了必要的工具.

## 页: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-js/examples) - 不同定制用途的代码片段.
-   [问题](https://npmcn.com/package/%40auth0/auth0-acul-js/FAQ.md) - 对有关Auth0 ACUL JS SDK的常见问题找到答案.

## 开始

### 先决条件

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

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

### 安装

您可以轻松地安装 SDK 通过 [无](https://npmjs.org/)数字 :

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

在安装 SDK 后, 您可以导入您想要配置的相关屏幕模块

### 导入屏幕

```js
// Default import of any particular screen, eg: login-id screen
import  LoginId  from '@auth0/auth0-acul-js/login-id'; 

// Named import of any screen
import  { LoginId }  from '@auth0/auth0-acul-js'; 

// Default import of all screens
import  * as Screens  from '@auth0/auth0-acul-js'; 

```

注:关于所有屏幕导入路径的更详细情况,请参见: [FAQ的电话](https://npmcn.com/package/%40auth0/auth0-acul-js/FAQ.md)。 。 。 .

## 使用量

### 将功能添加到屏幕

让我们看看在逻辑上增加逻辑的例子 `login-id` 屏幕.

#### 示例: 在登录按钮中添加逻辑

```typescript
  import  LoginId  from '@auth0/auth0-acul-js/login-id';

  const loginIdManager = new LoginId();

  // Trigger the login method on button click
  loginIdManager.login({
    username: "testUser"
  });
```

#### 获取登录的强制字段列表

```typescript
const { transaction } = loginIdManager
const requiredFields = transaction.getActiveIdentifiers();
```

#### 整合登录的社会连接

允许用户通过社交连接(如Google,Facebook)登录,使用以下片段

```typescript
import  LoginId  from "@auth0/auth0-acul-js/login-id";
const loginIdManager = new LoginId();

// Check if alternateConnections is available and has at least one item
if (!loginIdManager.transaction.alternateConnections) {
  console.error('No alternate connections available.');
}

// Select the first available connection (users can select any available connection)
const selectedConnection = alternateConnections[0];

// Log the chosen connection for debugging or informational purposes
console.log(`Selected connection: ${selectedConnection.name}`);

// Proceed with social login using the selected connection
loginIdManager.socialLogin({
  connection: selectedConnection.name,
})
```

#### 登录处理出错

一个顶级的获取器功能, `getErrors`,可用于在后端验证失败时检索详细的认证错误.

```javascript
import Login from "@auth0/auth0-acul-js/login";

const loginIdManager = new Login();

const errors = loginIdManager.getErrors();
if (errors) {
  console.error("Login failed:", errors);
}
```

也可以使用 `transaction.errors` 可在屏幕上直接为每个屏幕提供上下文.

```javascript
import Login from "@auth0/auth0-acul-js/login";

const loginIdManager = new Login();

const errors = loginIdManager.transaction?.errors ?? [];
if (errors) {
  console.error("Login failed:", errors);
}
```

更多例子请访问我们 [实例](https://github.com/auth0/universal-login/blob/master/packages/auth0-acul-js/examples/login-id.md)

## 用 Boilerplate App 快速启动

起来,用我们的锅炉板启动模板快速运行: [链接](https://github.com/auth0/auth0-acul-react-boilerplate)

## API 参考

### 屏幕

| 没有. | 提示 | 屏幕名称 | 文档链接 |
| --- | --- | --- | --- |
| 1个 | 登录 | 登录 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.Login.html) |
| 2个 | 登录编号 | 登录编号 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.LoginId.html) |
| 3个 | 登录密码字 | 登录密码字 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.LoginPassword.html) |
| 页:1 | 注册编号 | 注册编号 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.SignupId.html) |
| 页:1 | 注册密码 | 注册密码 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.SignupPassword.html) |

探索更多屏幕...

| 没有. | 提示 | 屏幕名称 | 文档链接 |
| --- | --- | --- | --- |
| 6个 | 无密码登录 | 登录无密码电子邮件编码 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.LoginPasswordlessEmailCode.html) |
| 第7条 | 无密码登录 | 登录无密码- sms- otp | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.LoginPasswordlessSmsOtp.html) |
| 第8条 | 密码 | 钥匙注册 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.PasskeyEnrollment.html) |
| 第9条 | 密码 | 密码录入- 本地 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.PasskeyEnrollmentLocal.html) |
| 10个 | 电话识别器注册 | 电话识别器注册 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.PhoneIdentifierEnrollment.html) |
| 第11个 | 电话识别-质疑 | 电话识别-质疑 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.PhoneIdentifierChallenge.html) |
| 第12条 | 电子邮件识别器质疑 | 电子邮件识别器质疑 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.EmailIdentifierChallenge.html) |
| 第13条 | 夹克 | 间歇式控制 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.InterstitialCaptcha.html) |
| 页:1 | 重置密码字 | 重置密码电子邮件 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.ResetPasswordEmail.html) |
| 15个 | 重置密码字 | 重置密码字请求 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.ResetPasswordRequest.html) |
| 16个 | 重置密码字 | 重置密码字 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.ResetPassword.html) |
| 页:1 | 重置密码字 | 重置密码 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.ResetPasswordError.html) |
| 第 18 条 | 重置密码字 | 重置密码- 成功 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.ResetPasswordSuccess.html) |
| 第 19 条 | 注册 | 注册 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.Signup.html) |
| 20国 | 玛法 | mfa- detect-浏览器能力 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.MfaDetectBrowserCapabilities.html) |
| 21国 | 玛法 | mfa 滚动结果 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.MfaEnrollResult.html) |
| 22个 | 玛法 | mfa - 开始滚动 - 选项 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.MfaBeginEnrollOptions.html) |
| 第23条 | 玛法 | mfa 登录选项 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.MfaLoginOptions.html) |
| 24个 | 闪电 | mfa-push-enrollment-qr (法语) | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.MfaPushEnrollmentQr.html) |
| 第25条 | 闪电 | 法-普-欢迎 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.MfaPushWelcome.html) |
| 第 26 条 | 闪电 | mfa-push-挑战-push | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.MfaPushChallengePush.html) |
| 27个 | 闪电 | 缩写列表 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.MfaPushList.html) |
| 第28条 | mfa-sms (英语) | mfa 国家代码 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.MfaCountryCodes.html) |
| 29个 | mfa-sms (英语) | mfa - sms - 挑战 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.MfaSmsChallenge.html) |
| 30个 | mfa-sms (英语) | mfa - sms - 注册 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.MfaSmsEnrollment.html) |
| 31个 | mfa-sms (英语) | mfa - sms - 列表 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.MfaSmsList.html) |
| 第32条 | 电子邮件 | 电子邮件挑战 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.MfaEmailChallenge.html) |
| 33个 | 电子邮件 | 电子邮件列表 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.MfaEmailList.html) |
| 页:1 | 维塔蒂诺 | 接受邀请 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.AcceptInvitation.html) |
| 35个 | 组织 | 组织选择者 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.OrganizationPicker.html) |
| 第36条 | 组织 | 组织选择 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.OrganizationSelection.html) |
| 页:1 | 重置密码字 | mfa-otp-挑战 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.MfaOtpChallenge.html) |
| 第38条 | 缩写 | mfa-otp- 注册码 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.MfaOtpEnrollmentCode.html) |
| 页:1 | 缩写 | mfa-otp-enrollment-qr (法语) | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.MfaOtpEnrollmentQr.html) |
| 第40条 | 重置密码字 | 重置密码-mfa-电子邮件-质疑 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.ResetPasswordMfaEmailChallenge.html) |
| 第41条 | 重置密码字 | 重置- 密码- mfa- push- 挑战- push | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.ResetPasswordMfaPushChallengePush.html) |
| 第42条 | 重置密码字 | mfa - sms - 挑战 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.ResetPasswordMfaSmsChallenge.html) |
| 第43条 | 重置密码字 | 重置密码- mfa- otp- 挑战 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.OrganizationSelection.html) |
| 第44条 | 麦克风 | 移动电话注册 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.MfaPhoneEnrollment.html) |
| 第45条 | mfa 语音 | mfa 语音注册 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.MfaVoiceEnrollment.html) |
| 第46条 | mfa - 恢复代码 | mfa-恢复-代码挑战 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.MfaRecoveryCodeChallenge.html) |
| 第47条 | 设备流量 | 设备编码-激活-分配 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.DeviceCodeActivationAllowed.html) |
| 第48条 | 设备流量 | 设备编码-激活-拒绝 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.DeviceCodeActivationDenied.html) |
| 第49条 | 设备流量 | 设备编码激活 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.DeviceCodeActivation.html) |
| 第50条 | 重置密码字 | 重置密码-mfa-回收-代码-挑战 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.ResetPasswordMfaRecoveryCodeChallenge.html) |
| 51国 | 重置密码字 | 重置密码- mfa- voice | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.ResetPasswordMfaVoiceChallenge.html) |
| 第52条 | 常见 | 赎回盘 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.RedeemTicket.html) |
| 第53条 | 设备流量 | 设备编码确认 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.DeviceCodeConfirmation.html) |
| 页:1 | 麦克风 | 手机挑战 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.MfaPhoneChallenge.html) |
| 第55条 | mfa 语音 | mfa - 语音挑战 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.MfaVoiceChallenge.html) |
| 页:1 | mfa - 恢复代码 | mfa - 恢复- 代码注册 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.MfaRecoveryCodeEnrollment.html) |
| 页:1 | 重置密码字 | 重设密码-mfa-手机挑战 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.ResetPasswordMfaPhoneChallenge.html) |
| 页:1 | mfa - 恢复代码 | mfa - 恢复 - 代码 - 挑战 - 新代码 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.MfaRecoveryCodeChallengeNewCode.html) |
| 59国 | 登录 | 登录 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.Logout.html) |
| 页:1 | 登录 | 已注销 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.LogoutAborted.html) |
| 页:1 | 登录 | 登录完成 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.LogoutComplete.html) |
| 第62条 | 电子邮件核查 | 电子邮件核查结果 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.EmailVerificationResult.html) |
| 页:1 | 登录电子邮件核查 | 登录电子邮件核查 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.LoginEmailVerification.html) |
| 64国道 | mfa-webauthn (英语) | mfa-webauthn-平台的注册 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.MfaWebAuthnPlatformEnrollment.html) |
| 65个 | mfa-webauthn (英语) | mfa-webauthn-error (英语) | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.MfaWebAuthnError.html) |
| 页:1 | mfa-webauthn (英语) | mfa-webauthn-roaming-information 互联网档案馆的存檔,存档日期2013-12-02 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.MfaWebAuthnRoamingEnrollment.html) |
| 67国道 | mfa-webauthn (英语) | mfa-webauthn-roamming-挑战 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.MfaWebAuthnRoamingChallenge.html) |
| 68国 | mfa-webauthn (英语) | mfa-webauthn-平台-挑战 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.MfaWebAuthnPlatformChallenge.html) |
| 第69条 | mfa-webauthn (英语) | mfa-webauthn - 注册 - 成功 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.MfaWebAuthnEnrollmentSuccess.html) |
| 70个 | mfa-webauthn (英语) | mfa-webauthn-change-key-昵称 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.MfaWebAuthnChangeKeyNickname.html) |
| 页:1 | mfa-webauthn (英语) | mfa -webauthn - 不可用 - 错误 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.MfaWebAuthnNotAvailableError.html) |
| 72国 | 重置密码字 | 重置密码-mfa-webauthn-平台-挑战 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.ResetPasswordMfaWebAuthnPlatformChallenge.html) |
| 73国 | 重置密码字 | 重设密码-mfa-webauthn-roaming-challenge(英语: | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.ResetPasswordMfaWebAuthnRoamingChallenge.html) |
| 第74条 | 同意书 | 同意书 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.consent.html) |
| 第75条 | 定制同意 | 定制同意 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.CustomizedConsent.html) |
| 第76条 | 电子邮件 | 电子邮件 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.EmailOTPChallenge.html) |
| 77国 | 确认 | 确认 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.Confirmation.html) |
| 78国 | 同意书 | 尚待同意 | [链接](https://auth0.github.io/universal-login/auth0-acul-js/classes/Screens.PendingConsent.html) |
|  |

## 帮助函数

本节记录了屏幕实例在 Auth0-acul-js 中曝光的帮助方法和属性 .

### 上下文属性

-   `user`\- 现行交易的当前用户/简介数据.
    
-   `tenant`\- 租户配置和元数据(领域、区域、设置).
    
-   `branding`\- 品牌/主题配置(颜色、标志、字体、视觉标志). `branding.themes.default.identifiers` 附加标识符显示首选项( q)`loginDisplay`, (中文(简体) ), `otpAutocomplete`, (中文(简体) ), `phoneDisplay` 与 `masking` 财务报告和审定财务报表 `formatting`; 计 数 `identifiers` 当租户配置其中任何一个时,键会被省略.
    
-   `client`\- 应用程序客户端元数据和设置.
    
-   `countryCodes`\- 现有的电话国家代码(`available`,每个带 `code`, (中文(简体) ), `label`, (中文(简体) ), `dialCode`)和建议的默认(`recommended`(三); `null` 没有提供。 在注册和登录屏幕上,通过选中的 `code` 恢复为 `phoneCountryCode` 与电话号码一起从一个屏幕上提交,而不是通过路由 `pickCountryCode()`打开 `login` 财务报告和审定财务报表 `login-id` 它需要与 `identifierType: 'phone'`。 。 。 .
    
-   `organization`\- 适用的组织背景.
    
-   `prompt`\- 当前快速/流程配置 .
    
-   `untrustedData`\- 未经信任的投入(URL参数、预填表值).
    
-   `screen`\- 当前的屏幕元数据和配置.
    
-   `transaction`\- 交易/流程状态、会话标识符和相关数据.
    
-   `experiment`\- 当前屏幕的主动实验中心试验,或 `null` 当没有实验活动或屏幕没有选择通过 `context_configuration`. 暴露指定的变异(`experimentId`, (中文(简体) ), `variationId`, (中文(简体) ), `variationName`, (中文(简体) ), `variationDescription`, (中文(简体) ), `isControl`和解决 `config` (一个实验定义的地图——通过它读取一个密钥的解析值) `value` 财产,例如:. `experiment.config?.['show_passkey']?.value`,而且总是无效检查 `experiment` 首`config` 可能缺席,所以要小心 `?.` 页:1 分会 `isControl` 使基线对治疗UI.
    

### 标识管理

-   `getLoginIdentifiers()`数字 : 获取可用的登录标识类型( 电子邮件、 电话、 用户名)
    
-   `getSignupIdentifiers()`: 获取可用的注册标识符类型, 每个类型都有其 `required` 状态
    

### 表格验证

-   `validatePassword(password: string)`数字 : 实时密码强度验证
-   `validateUsername(username: string)`: 用户名格式和可用性验证

### 外交部/推动投票和重新发送

-   `pollingManager()`: 开始并管理对外交部推动挑战的投票.
    
-   `resendManager()` 获得此屏幕的超时管理功能重传.
    

### 共同帮助者

-   `getCurrentScreen()`  
    返回当前屏幕上下文数据 .
    
-   `getCurrentThemeOptions()` 从品牌上下文中获取具有平整配置的当前主题选项. 仅返回样式符号( E)`colors`, (中文(简体) ), `fonts`, (中文(简体) ), `borders`, (中文(简体) ), `pageBackground`, (中文(简体) ), `widget`)——读 `branding.themes.default.identifiers` 用于标识符显示首选项.
    
-   `getErrors()` 从交易上下文获取当前错误
    

## \* 反馈

### 捐款

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

-   [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-js 是什么？

Auth0 ACUL JS SDK 允许您与全域登录的高级自定义工作\.

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

在项目目录运行 npm install @auth0/auth0-acul-js，或使用 pnpm add / yarn add / bun add。

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

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

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

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

### @auth0/auth0-acul-js 需要什么版本的 Node\.js？

package\.json 的 engines 字段要求 Node\.js \>=18。版本不符时 npm 默认只给出警告，开启 engine-strict 后会拒绝安装。

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

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

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

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

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

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

