WhatOTP is a secure, elegant, and feature-rich Two-Factor Authentication (2FA) authenticator built specifically as a Telegram Mini App. It allows users to protect their accounts with Time-based One-Time Passwords (TOTP) directly within Telegram, backed by secure server-side encryption and biometric authentication.
- 🔐 Secure Storage: User secrets are encrypted and stored securely on private servers.
- 🛡️ Biometric & Passcode Protection: Integrated with Telegram's Biometric Manager for FaceID/TouchID support and a fallback 6-digit passcode.
- ☁️ Cloud Sync (Telegram ID): Accounts are tied to your Telegram user ID, allowing access across devices where you use Telegram.
- 📥 Import / 📤 Export:
- Scan QR codes to add accounts.
- Export accounts via QR code or file to migrate to other apps.
- 🌍 Multi-Language Support:
Just add your language translations file into lib/locales with language_code.json file name and add its lottie file to the public/lotties/flags/language_code.json to add enw language.
- 🇺🇸 English
- 🇮🇳 Hindi (हिन्दी)
- 🇧🇩 Bengali (বাংলা)
- 🇮🇩 Indonesian (Bahasa Indonesia)
- And many more
- 🎨 Modern UI:
- Beautiful dark/light mode support.
- Smooth animations using Lottie and Framer Motion.
- Brand icons support via Simple Icons.
- 🤖 Bot Integration: A companion bot (
/start) that provides a welcome guide and quick app launch.
- Framework: Next.js 14+ (App Router)
- Language: TypeScript
- Styling: Tailwind CSS, Lucide React (Icons)
- Animations: Framer Motion, Lottie React
- Database: MySQL (via
mysql2) - Cryptography:
otpauth(TOTP generation),bcryptjs(Hashing),crypto(Encryption) - Deployment: Vercel (recommended)
- Node.js 18+
- MySQL Database
- Telegram Bot Token (from @BotFather)
-
Clone the repository:
git clone https://github.com/nasirul786/WhatOTP.git cd WhatOTP -
Install dependencies:
npm install
-
Environment Setup: Create a
.envfile in the root directory and copy the .env.example to it -
Database Setup: manually create the tables using the sql from
db.sqlon this repo -
Run Development Server:
npm run dev
Open
http://localhost:3000to verify it's running. Note that Mini App specific features (likewebAppcontext) will only work when opened inside Telegram. You can use ngrok to get https url of your localhost
- Open @BotFather on Telegram.
- Create a new command
/newapp. - Select your bot.
- Enter the title (e.g., "WhatOTP") and short description.
- Provide the HTTPS URL of your deployed application (e.g.,
https://your-project.vercel.app). - Used the generated Direct Link to access the Mini App.
We prioritize user privacy. Access the privacy policy at /privacy.
- Data: We store encrypted TOTP secrets linked to your Telegram ID.
- Deletion: Users can permanently delete their account and all associated data via the app settings (subject to a 24-hour security period).
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License.