mklarsen / docker-node-mfa-tutorial

Code for Add 2-Factor Authentication with Google Authenticator in Node.js

Home Page:https://blog.shahednasser.com/how-to-add-authentication-with-google-authenticator-in-node-js/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add MFA/2FA Authentication with Google Authenticator

*So why this?

I wanted to extend the tutorial with docker

Installation

After cloning this repository, install the dependencies:

npm i

Run the APP

Run the 'APP' with the following command:

npm start

The 'APP' will run at port 3000 if you do not change the config/default.json

Test it

Open your browser http://localhost:3000

Ready for docker

Create docker container

Build and tag you Docker container (eg: mfa)

docker build . -t mfa

Start the MFA Docker image

docker run -p 3000:3000 -d mfa

The server will run at port 3000 if you do not change

  • config/default.json
  • Dockerfile (expose port)

Test it

Open your browser http://localhost:3000

About

Code for Add 2-Factor Authentication with Google Authenticator in Node.js

https://blog.shahednasser.com/how-to-add-authentication-with-google-authenticator-in-node-js/


Languages

Language:EJS 48.3%Language:JavaScript 47.6%Language:Dockerfile 4.1%