---
title: "OTP 验证器 - TOTP 动态口令自测工具 - AllTools - 全能工具箱"
description: "AllTools OTP 验证器用密钥生成 TOTP 二维码并校验动态码。开发接入两步验证时自测流程，确认算法与时钟同步无误后再上线，少出登录故障。上线更稳。"
canonical_url: "https://tool.warmday.wang/design/otp-verification"
meta:
  author: AllTools
  keywords: "在线工具箱, AllTools, 实用工具, 生活常用, 数学计算, 文本处理, 图片处理, 开发者工具, PDF 工具, 单位换算, 免费工具, 免登录工具"
  "og:description": "AllTools OTP 验证器用密钥生成 TOTP 二维码并校验动态码。开发接入两步验证时自测流程，确认算法与时钟同步无误后再上线，少出登录故障。上线更稳。"
  "og:image": "https://tool.warmday.wang/img/og-cover.png"
  "og:image:alt": "AllTools - 全能工具箱 Logo"
  "og:image:height": "630"
  "og:image:width": "1200"
  "og:title": "OTP 验证器 - TOTP 动态口令自测工具"
  "twitter:image": "https://tool.warmday.wang/img/og-cover.png"
---

> Index of every page on this site: [llms.txt](https://tool.warmday.wang/llms.txt)

# **TOTP 验证器**

生成双因素认证二维码并验证动态密码

### **OTP 二维码生成与验证**

二维码生成中...

**密钥 (Secret)**

**OTP URI**

验证区域

**输入 OTP 密码**

**当前动态密码：**777312

剩余时间：19 秒

使用说明

**功能说明：**

- 生成符合 RFC 6238 标准的 TOTP 二维码
- 支持 Google Authenticator、Microsoft Authenticator 等认证器
- 可在线验证动态密码是否正确
- 每 30 秒自动更新一次动态密码

**使用方法：**

1. 使用手机认证器 APP 扫描二维码
2. 或手动复制密钥添加到认证器
3. 在输入框中输入认证器显示的 6 位密码
4. 点击"验证"按钮检查密码是否正确

### **代码使用示例**

在其他页面中使用 `QRCodeOTP` 组件非常简单：

```
<template>
  <QRCodeOTP
    id="user-123"
    hash="unique-hash-value"
    @verified="handleVerified"
    @failed="handleFailed"
  />
</template>

<script setup>
// 处理验证成功
const handleVerified = (data) => {
  console.log('验证成功:', data)
  // data.delta - 时间偏移量
  // data.token - 验证的令牌
}

// 处理验证失败
const handleFailed = (error) => {
  console.log('验证失败:', error)
  // error.reason - 失败原因
}
</script>
```

**参数说明：**

- `id` (必填): 唯一标识符，用于区分不同的 OTP 配置
- `hash` (可选): 哈希值，用于生成唯一密钥种子

**事件说明：**

- `{'@'}verified`: 验证成功时触发，返回验证结果数据
- `{'@'}failed`: 验证失败时触发，返回错误信息

## **同类工具**

同一个分类下还有这些 · 设计辅助

[**配色生成器**配色生成器可一键生成多种风格的配色方案，锁定喜欢的颜色后还能继续衍生邻近色与对比色，满意后直接复制 HEX 色值到设计稿中，为网站或 App 快速定下统一的视觉基调，省去反复调色的试错。](https://tool.warmday.wang/design/colors) [**颜色格式转换**颜色格式转换工具在 HEX、RGB、HSL、CMYK、HSV 之间实时互转，拖动取色器即可同步显示全部格式的数值，写前端样式或对接印刷工艺时无需再手动查表换算，一处改动处处更新。](https://tool.warmday.wang/design/color-converter) [**二维码生成**二维码生成器支持嵌入 Logo、自定义圆角与配色，并导出矢量 SVG，兼顾屏幕展示与印刷物料两种场景，扫码成功率也比纯黑白码更稳妥，品牌露出更自然。](https://tool.warmday.wang/design/qrcode) [**二维码解码**二维码解码工具支持拖入图片或直接调用摄像头识别，自动提取其中的网址、文本或 WiFi 信息并复制到剪贴板，手机扫不清时电脑端补扫很方便，省去手动输入。](https://tool.warmday.wang/design/qrcode-decoder) [**条形码生成**条形码生成器支持 Code128、EAN、UPC 等十余种制式，输入内容即可生成符合规范的条码并导出为矢量文件，小批量打样和零售标品都能直接拿去用，不必另装专业软件。](https://tool.warmday.wang/design/barcode) [**条形码解码**条形码解码工具可识别一维码图片中的编码内容，适合库存盘点、商品核对等需要快速读取条码信息的场景，无需专用扫码枪也能完成批量识别，省去手动敲数字。](https://tool.warmday.wang/design/barcode-decoder)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://tool.warmday.wang/#organization","name":"AllTools","alternateName":"AllTools - 全能工具箱","url":"https://tool.warmday.wang/","logo":{"@type":"ImageObject","url":"https://tool.warmday.wang/img/logo.png","width":512,"height":512}},{"@type":"WebSite","@id":"https://tool.warmday.wang/#website","url":"https://tool.warmday.wang/","name":"AllTools - 全能工具箱","inLanguage":"zh","publisher":{"@id":"https://tool.warmday.wang/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://tool.warmday.wang/?q={search_term_string}"},"query-input":"required name=search_term_string"}},{"@type":"WebPage","@id":"https://tool.warmday.wang/design/otp-verification#webpage","url":"https://tool.warmday.wang/design/otp-verification","isPartOf":{"@id":"https://tool.warmday.wang/#website"},"inLanguage":"zh","name":"OTP 验证器 - TOTP 动态口令自测工具","description":"AllTools OTP 验证器用密钥生成 TOTP 二维码并校验动态码。开发接入两步验证时自测流程，确认算法与时钟同步无误后再上线，少出登录故障。上线更稳。"},{"@type":"SoftwareApplication","@id":"https://tool.warmday.wang/design/otp-verification#app","name":"OTP 验证器 - TOTP 动态口令自测工具","description":"AllTools OTP 验证器用密钥生成 TOTP 二维码并校验动态码。开发接入两步验证时自测流程，确认算法与时钟同步无误后再上线，少出登录故障。上线更稳。","url":"https://tool.warmday.wang/design/otp-verification","applicationCategory":"DesignApplication","operatingSystem":"Web","inLanguage":"zh","isPartOf":{"@id":"https://tool.warmday.wang/design/otp-verification#webpage"},"offers":{"@type":"Offer","price":"0","priceCurrency":"CNY"}},{"@type":"BreadcrumbList","@id":"https://tool.warmday.wang/design/otp-verification#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"首页","item":"https://tool.warmday.wang/"},{"@type":"ListItem","position":2,"name":"设计辅助","item":"https://tool.warmday.wang/design"},{"@type":"ListItem","position":3,"name":"OTP 验证器","item":"https://tool.warmday.wang/design/otp-verification"}]}]}
```

## Sitemap

See the full [sitemap](https://tool.warmday.wang/sitemap.md) for all pages.
