Client-Side Generation · Zero Secret Exposure · Ephemeral Sharing
Generate 2FA tokens in your browser and share them via secure, one-time links without ever revealing your secret key to the server.
- 🔒 Zero Secret Exposure: Your TOTP secret key is used to calculate codes locally in your browser. The secret key is never sent to the server.
- ⏱️ Ephemeral Access: Links can be set to expire after a specific time (1h, 12h, 24h).
- 🔥 Burn After Reading: Optional "Single View" mode ensures the link is destroyed immediately after being accessed once.
- 📱 Responsive Design: Optimized for mobile and desktop, perfect for sharing 2FA access with colleagues or family members.
- 🛡️ Privacy Focused: No user accounts required. No tracking.
- Framework: Next.js 15 (App Router)
- Language: TypeScript
- Styling: Tailwind CSS
- Database: PostgreSQL (via Prisma ORM & Prisma Accelerate)
- Icons: Lucide React
- Deployment: Vercel
|
|
|
|
- Node.js 18+
- pnpm (recommended) or npm
- A PostgreSQL database (e.g., Vercel Postgres, Neon, or local)
-
Clone the repository
git clone https://github.com/Kadxy/OTP-share.git cd OTP-share -
Install dependencies
pnpm install
-
Configure Environment Variables Rename
.env.exampleto.envand add your database connection string. Since this project uses Prisma Accelerate, you need an Accelerate URL (You can get it from Vercel).PRISMA_DATABASE_URL="prisma+postgres://accelerate.prisma-data.net/..."
-
Generate Prisma Client & Push Schema to Accelerate
npx prisma generate && npx prisma push -
Run Development Server
pnpm dev
Open http://localhost:3000 with your browser.
- Input Secret: User enters their TOTP Secret Key in the browser.
- Local Calculation: The browser calculates all future TOTP codes for the selected validity period (e.g., next 1 hour).
- Secure Storage: Only the generated codes (not the secret key) are sent to the server and stored in the database.
- Link Generation: A unique, random 7-character ID is generated.
- Access: The recipient opens the link and sees the valid code for the current time window.
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.



