Giter Site home page Giter Site logo

anweshandev / totp-generator Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 6.59 MB

Generates TOTP tokens in the browser

Home Page: https://anrcry.github.io/totp-generator

License: MIT License

HTML 67.00% JavaScript 30.48% CSS 2.52%
totp totp-generator totp-tokens two-factor-authentication chrome-extension javascript

totp-generator's Introduction

Generate time-based one time passwords in the browser

A snapshot of the totp token generator website

Table of Contents

Introduction

This page lets you easily generate a time-based one time password (TOTP) entirely in the web browser in case you ever lose access to your phone.

Libraries Used

The library uses the excellent otpauth package, downloaded from raw.githubusercontent.com/zant95/otpauth/master/dist/otpauth.min.js.

Full Demo Link

Full Demo

Providing parameters in the URL

Private key

You can provide the key in the URL using the URI fragment or a query parameter, for example: https://totp.cybrix.in/#/KEY or https://totp.cybrix.in?key=KEY

Digits and period

You can also provide the digits and token period using a query string in the URL, for example: https://totp.cybrix.in/?period=60&digits=6&key=KEY

Authy support

To use Authy tokens outside of the Authy app, you need to extract the secret key and convert it to base-32. The resulting token can then be used with this tool.

Extract Authy secret key from Chrome App

  1. Install the Authy app in Chrome.
  2. Enter chrome://extensions in the address bar.
  3. Check Developer mode.
  4. Click the main.html link in the Inspect views section of the Authy app.
  5. Navigate to the Console.
  6. Paste the code below in the console and hit Enter.
appManager.getModel().forEach(model => console.log(`${model.name}: ${model.secretSeed}`));

Convert hex keys to base-32

Convert each exported hex key from above using the hex to base-32 converter in this repository.

Authy settings

Use the following settings for native Authy tokens.

Digits: 7 Period: 10

The period shown in the Authy Chrome App is 20 seconds, but it actually uses 10 second intervals and skips every other token.

If your authenticator application only allows 6 or 8 digits (like FreeOTP), choose 8 digits and use the last 7 digits for your code.

Import using QR codes

To make it easier to import Authy entries into another authenticator app, generate QR codes using my QR code generator.

Other Resources

totp-generator's People

Contributors

anweshandev avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.