Skip to content

About

拒绝验证器应用!在线解决双因素验证问题/Reject the authenticator app! Solve the two-factor authentication issue online

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

🔐 SashaMC's 2FA Authenticator

中文

A privacy-first, zero-dependency, pure frontend TOTP (2FA) authenticator powered by Web Crypto API.

🌐 Live Demo: https://2fa.sashamc.de5.net

✨ Features

  • 🔑 Real-time TOTP generation (SHA-1 / SHA-256 / SHA-512, 6/8 digits, 30s/60s)
  • 📷 QR code recognition from images (PNG / JPG / SVG / WebP / BMP)
  • 📹 Live camera scanning
  • 🔗 Import/export standard otpauth:// URIs
  • 📡 Output protocol (generate URI + download PNG/SVG QR codes)
  • 🎲 Cryptographically secure random secret generation
  • 📤📥 JSON backup & restore
  • 🔍 Account search/filter
  • 🌙☀️ Dark/Light theme toggle
  • 🔵 Circular countdown ring (yellow at 10s, red at 5s)
  • 🎨 Cyberpunk UI + Matrix rain background

🛡️ Security

  • ✅ Secrets never leave your browser — stored only in localStorage
  • ✅ TOTP computed via native Web Crypto API HMAC — no third-party crypto libs
  • ✅ QR scanning uses jsQR (jsDelivr CDN), zero build dependencies
  • ⚠️ Clearing browser data will erase all accounts — export JSON backups regularly!

🚀 Deployment

Cloudflare Pages (Recommended)

  1. Fork this repo
  2. Cloudflare Dashboard → Workers & Pages → Create → Pages → Connect to Git
  3. Leave build command empty, output directory empty
  4. Deploy → Custom domains → bind your subdomain
  5. Wait for SSL certificate provisioning

Local Usage

Simply open index.html in your browser. No server required.

📁 Project Structure

index.html — Main page style.css — Cyberpunk theme styles app.js — Core engine (TOTP + QR decode + QR generate) worker-example.js — Example Worker backend (interface only, no production config) wrangler.example.toml — Example Worker configuration

🔧 Tech Stack

TOTP: RFC 4226 / RFC 6238 + Web Crypto API QR Decode: jsQR (jsDelivr CDN) QR Generate: Canvas / SVG native Storage: localStorage Hosting: Cloudflare Pages

📺 Related Video

Bilibili: https://b23.tv/9010oxu


Made with 🦊 by SashaMC · CapeMC on Bilibili

Note: If using GitCode, please go to download by GitHub Releases

About

拒绝验证器应用!在线解决双因素验证问题/Reject the authenticator app! Solve the two-factor authentication issue online

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages