Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Using Authy Two-Factor Authentication in Node.js and AngularJS

DZone's Guide to

Using Authy Two-Factor Authentication in Node.js and AngularJS

Implementing two-factor authentication in your JavaScript apps is quick and easy. Using a sample application, this quick runthrough guides you through the installation.

· Security Zone ·
Free Resource

Learning by doing is more effective than learning by watching - that’s why Codebashing offers a hands-on interactive training platform in 10 major programming languages. Learn more about AppSec training for enterprise developers.

If you are planning to use two-factor authentication in your application or getting started with the technology, this is definitely for you. 

This simple implementation of a web application based in Node.js and AngularJS will show you how to use two-factor authentication and protect assets. As a bonus feature, we also have a simple Phone Verification API sample application that allows you to verify the user has the device in their possession.

To download or clone this sample application, go here.

To get started, make sure you have Node.js and MongoDB installed and ready to go.

Follow these instructions to get up and running:

  • Clone the repo.
  • Run npm install
  • Register for a Twilio account.
  • Set up an Authy application via the Twilio Console.
  • Copy the Authy API Key from the Authy Dashboard and save it in your demo.env file.
  • Make sure your MongoDB instance is up and running.
  • Run node . from the cloned repo to start the app.

Have fun!

Find out how CxSAST can help you scan uncompiled and unbuilt code while identifying hundreds of security vulnerabilities in the most prevalent coding languages.

Topics:
two-factor authentication ,security ,node js ,angularjs

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}