Skip to content
Demo of generating OTP in JS
JavaScript HTML CSS
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Web OTP Demo

This is a 2FA OTP code generator written in JS.

It is a supplementary demo for my article Generating 2FA One-Time Passwords in JS Using Web Crypto API.

As you can see from the article's title it uses Web Crypto API. It also uses stream-display and jsQR libraries to recognize 2FA QR codes.

Live demo can be found here

Running locally

Just run your favourite http server against the dist directory. For example

npm i -g http-server
http-server dist

Additionally if you want to tinker with it -- you'll need to rebuild the sources before running the server.

npm install
npm run build
You can’t perform that action at this time.