npx skills add https://github.com/auth0/agent-skills --skill auth0-mfa添加多因素身份验证以保护用户账户,并对敏感操作要求额外验证。
多因素身份验证要求用户提供两个或更多验证因素才能访问其账户。Auth0 支持多种 MFA 因素,并支持对敏感操作进行升级身份验证。
| 因素 | 类型 | 描述 |
|---|---|---|
| TOTP | 你所拥有的东西 | 基于时间的一次性密码(Google Authenticator、Authy) |
| SMS | 你所拥有的东西 | 通过短信发送的一次性验证码 |
| 电子邮件 | 你所拥有的东西 | 通过电子邮件发送的一次性验证码 |
| 推送通知 | 你所拥有的东西 | 通过 Auth0 Guardian 应用程序发送的推送通知 |
| WebAuthn | 你所拥有的东西/你所是的东西 | 安全密钥、生物识别、通行密钥 |
| 语音 |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 你所拥有的东西 |
| 通过电话呼叫发送的一次性验证码 |
| 恢复代码 | 备份 | 一次性使用的恢复代码 |
| 概念 | 描述 |
|---|---|
acr_values | 在身份验证期间请求 MFA |
amr 声明 | 身份验证方法参考 - 指示用户如何进行身份验证 |
| 升级身份验证 | 在初始登录后对特定操作要求 MFA |
| 自适应 MFA | 根据风险信号有条件地要求 MFA |
# 查看当前的 MFA 配置
auth0 api get "guardian/factors"
# 启用 TOTP(一次性密码)
auth0 api put "guardian/factors/otp" --data '{"enabled": true}'
# 启用 SMS
auth0 api put "guardian/factors/sms" --data '{"enabled": true}'
# 启用推送通知
auth0 api put "guardian/factors/push-notification" --data '{"enabled": true}'
# 启用 WebAuthn(漫游 - 安全密钥)
auth0 api put "guardian/factors/webauthn-roaming" --data '{"enabled": true}'
# 启用 WebAuthn(平台 - 生物识别)
auth0 api put "guardian/factors/webauthn-platform" --data '{"enabled": true}'
# 启用电子邮件
auth0 api put "guardian/factors/email" --data '{"enabled": true}'
# 设置 MFA 策略:"all-applications" 或 "confidence-score"
auth0 api patch "guardian/policies" --data '["all-applications"]'
升级身份验证对敏感操作要求 MFA,而无需每次登录都进行。
acr_values 参数通过在授权请求中包含 acr_values 来请求 MFA:
acr_values=http://schemas.openid.net/pape/policies/2007/06/multi-factor
所有框架的通用模式:
amr 声明)acr_values 参数请求 MFA有关完整的框架特定示例,请参阅示例指南:
此技能被拆分为多个文件以便更好地组织:
所有框架的完整代码示例:
学习如何在你的后端验证 MFA 状态:
高级 MFA 实施模式:
常见模式和故障排除:
auth0-quickstart - 基础 Auth0 设置auth0-passkeys - WebAuthn/通行密钥实施auth0-actions - 自定义身份验证逻辑每周安装次数
95
代码仓库
GitHub 星标数
10
首次出现
2026年2月6日
安全审计
已安装于
gemini-cli83
github-copilot83
codex83
opencode82
amp78
kimi-cli78
Add Multi-Factor Authentication to protect user accounts and require additional verification for sensitive operations.
Multi-Factor Authentication (MFA) requires users to provide two or more verification factors to access their accounts. Auth0 supports multiple MFA factors and enables step-up authentication for sensitive operations.
| Factor | Type | Description |
|---|---|---|
| TOTP | Something you have | Time-based one-time passwords (Google Authenticator, Authy) |
| SMS | Something you have | One-time codes via text message |
| Something you have | One-time codes via email | |
| Push | Something you have | Push notifications via Auth0 Guardian app |
| WebAuthn | Something you have/are | Security keys, biometrics, passkeys |
| Voice | Something you have | One-time codes via phone call |
| Recovery Code | Backup | One-time use recovery codes |
| Concept | Description |
|---|---|
acr_values | Request MFA during authentication |
amr claim | Authentication Methods Reference - indicates how user authenticated |
| Step-up auth | Require MFA for specific actions after initial login |
| Adaptive MFA | Conditionally require MFA based on risk signals |
# View current MFA configuration
auth0 api get "guardian/factors"
# Enable TOTP (One-time Password)
auth0 api put "guardian/factors/otp" --data '{"enabled": true}'
# Enable SMS
auth0 api put "guardian/factors/sms" --data '{"enabled": true}'
# Enable Push notifications
auth0 api put "guardian/factors/push-notification" --data '{"enabled": true}'
# Enable WebAuthn (Roaming - Security Keys)
auth0 api put "guardian/factors/webauthn-roaming" --data '{"enabled": true}'
# Enable WebAuthn (Platform - Biometrics)
auth0 api put "guardian/factors/webauthn-platform" --data '{"enabled": true}'
# Enable Email
auth0 api put "guardian/factors/email" --data '{"enabled": true}'
# Set MFA policy: "all-applications" or "confidence-score"
auth0 api patch "guardian/policies" --data '["all-applications"]'
Step-up auth requires MFA for sensitive operations without requiring it for every login.
acr_values ParameterRequest MFA by including acr_values in your authorization request:
acr_values=http://schemas.openid.net/pape/policies/2007/06/multi-factor
The general pattern for all frameworks:
amr claim)acr_values parameterFor complete framework-specific examples, seeExamples Guide:
This skill is split into multiple files for better organization:
Complete code examples for all frameworks:
Learn how to validate MFA status on your backend:
Advanced MFA implementation patterns:
Common patterns and troubleshooting:
auth0-quickstart - Basic Auth0 setupauth0-passkeys - WebAuthn/passkey implementationauth0-actions - Custom authentication logicWeekly Installs
95
Repository
GitHub Stars
10
First Seen
Feb 6, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
gemini-cli83
github-copilot83
codex83
opencode82
amp78
kimi-cli78
Azure 升级评估与自动化工具 - 轻松迁移 Functions 计划、托管层级和 SKU
96,200 周安装
LinkedIn内容创作指南:AI驱动的高互动帖子撰写技巧与结构公式
8,000 周安装
GitHub Copilot 重构计划工具 - 自动生成代码重构详细步骤与安全执行方案
8,200 周安装
Apple App Store 审核专家:AI 助手审查 iOS 应用代码与元数据,降低被拒风险
8,100 周安装
AI会议纪要生成技能:快速创建结构化内部会议记录,自动提取决策与行动项
8,100 周安装
Dataverse Python 生产级代码生成器 | 含错误处理、重试逻辑、OData优化
8,100 周安装
Pinia - Vue官方状态管理库:类型安全、支持Options/Composition API、TypeScript
8,200 周安装