Skip to content

A modern and reliable One-Time Password (OTP) auto-reader component built with React, TypeScript, and optimized for Progressive Web Apps (PWA)

Notifications You must be signed in to change notification settings

aliakbar-zohour/react-OTP

Repository files navigation

🔐 OTP Auto-Reader for PWA (React + TypeScript)

A modern and reliable One-Time Password (OTP) auto-reader component built with React, TypeScript, and optimized for Progressive Web Apps (PWA). It reads OTP codes automatically in all scenarios where supported – seamless, fast, and secure.


🚀 Features

  • ✅ Automatic reading of OTP from SMS using navigator.credentials.get({ otp })
  • 🧠 Works even when the app is installed as a PWA
  • 💡 Intelligent fallback when auto-read is not supported
  • 📱 Designed for mobile-first experience
  • 🔒 Secure and user-friendly
  • 🎯 Built with TypeScript for better DX and type safety

🛠️ Tech Stack

  • ⚛️ React.js – Modern UI rendering
  • 🔷 TypeScript – Strong typing
  • 💅 Tailwind CSS (optional) – For styling (if used)
  • 📦 Vite – Fast build tool
  • 📲 PWA Support – Fully installable and offline-ready

📦 Installation

# 1. Clone the repo
git clone https://github.com/aliakbar-zohour/react-OTP.git

# 2. Navigate to the folder
cd otp-auto-reader

# 3. Install dependencies
npm install

# 4. Run the app
npm run dev

About

A modern and reliable One-Time Password (OTP) auto-reader component built with React, TypeScript, and optimized for Progressive Web Apps (PWA)

Topics

Resources

Stars

Watchers

Forks

Contributors 2

  •  
  •