TOTP Verifier

Generate two-factor authentication QR codes and verify dynamic passwords

OTP QR Code Generation & Verification

Generating QR code...
Current Token:242613
Remaining Time:14 seconds

Features:

  • Generate TOTP QR codes compliant with RFC 6238
  • Supports Google Authenticator, Microsoft Authenticator, and more
  • Verify OTP tokens online
  • Token auto-refreshes every 30 seconds

How to Use:

  1. Scan the QR code with your mobile authenticator app
  2. Or manually copy and add the secret to your authenticator
  3. Enter the 6-digit code shown in your authenticator
  4. Click "Verify" to check if the code is correct

Code Example

Using the QRCodeOTP component in other pages is simple:

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

<script setup>
// Handle verification success
const handleVerified = (data) => {
  console.log('Verification succeeded:', data)
  // data.delta - time offset
  // data.token - verified token
}

// Handle verification failure
const handleFailed = (error) => {
  console.log('Verification failed:', error)
  // error.reason - failure reason
}
</script>

Parameters:

  • id (required): unique identifier for distinguishing different OTP configurations
  • hash (optional): hash value used to generate a unique secret seed

Events:

  • {'@'}verified: triggered on successful verification, returns verification result data
  • {'@'}failed: triggered on verification failure, returns error info