GithubHelp home page GithubHelp logo

isabella232 / auth0-authy-sample-app Goto Github PK

View Code? Open in Web Editor NEW

This project forked from auth0/auth0-authy-sample-app

0.0 0.0 0.0 22 KB

This is the sample app for setting up Authy TOTP 2FA with Auth0

License: MIT License

Shell 1.95% JavaScript 77.51% CSS 0.97% HTML 19.57%

auth0-authy-sample-app's Introduction

auth0-authy-sample-app

This is the sample app for setting up Authy TOTP 2FA with Auth0

Installation

  1. Install Dependencies
npm install
  1. Gather Credentials
  1. Create .env file with:
AUTH0_DOMAIN="[Your Auth0 Domain]"
AUTH0_CLIENT_ID="[Your Auth0 Client ID]"
AUTH0_CLIENT_SECRET="[Your Auth0 Client Secret]"
AUTH0_CALLBACK="http://localhost:3000/callback"
AUTHY_API_KEY="[Your Authy API Key]"
AUTH0_MANAGEMENT_TOKEN="[Your Auth0 Management API Token]"
  1. Modify wt-run script
#! /bin/bash

wt create --name authy-mfa --secret authy_api_key=[Your Authy API Key] --secret auth0_secret=[Your Auth0 Client Secret] --secret auth0_clientID=[Your Auth0 Client ID] --secret returnUrl=https://[Your Auth0 domain]/continue --output json --profile [Your Webtask.io Profile Name] authy-mfa-wt.js
  1. Make wt-run executable
> chmod +x wt-run
  1. install the webtask cli if you haven't already

  2. Deploy your webtask:

> ./wt-run
  1. modify rule.js
 var configuration = {
    CLIENT_ID: '[Your Auth0 Client ID]',
    CLIENT_SECRET: '[Your Auth0 Client Secret]',
    ISSUER: '[Your Auth0 Domain]'
  };
  1. open the rules tab in the dashboard, create a new rule, and paste the modified contents of rule.js into the editor window, and click 'Save'.

  2. Run the server

node bin/www
  1. navigate to http://localhost:3000 in your browser.

Caveat

There is a caveat with this project. If you're going to log into a social provider and use 2FA, you'll need to use your own dev keys with the social connection, or the rule will fail. Using email/password combination works just fine no matter the situation.

auth0-authy-sample-app's People

Contributors

nodebotanist 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.