anoop-singh-dev / MFA-Demo-Node

Two-factor authentication flow with Node

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MFA-Demo-Node-React

Two-factor authentication flow with Node and React

Why Time-based OTPs?

Time-based OTP (TOTP) is an algorithm that factors in the current time to generate a unique one-time password. TOTP (Time-based one-time password) provides the current time (typically in 30 seconds increments) as a counter value to generate a one-time password

In today’s age, it is a no-brainer that passwords alone can’t keep the bad guys out. You need an additional layer of security — a second factor.

It’s secure because:

  • The password changes every n number of seconds (usually, 30 seconds), preventing eavesdroppers from using that same password later in the future if somehow they’re able to get hold of it.
  • The password may be generated by an app on the user’s phone, making it more difficult for an attacker to acquire the password, as the user’s phone is usually by his/her side
  • In mobile app implementations, the user only needs to launch the TOTP application and then key-in the TOTP that appears on-screen into the application.
  • Unlike most mobile-based one-time passwords that need to be received via a text message or the Internet through some wireless connection, TOTPs aren’t dependent on the presence of a cellular signal or data connection.

To run this web-app

  • Install dependencies: npm install
  • Start the server: node app.js
  • Start front-end: npm run start

About

Two-factor authentication flow with Node


Languages

Language:TypeScript 50.6%Language:JavaScript 24.6%Language:HTML 18.8%Language:CSS 6.1%