albertlemosbr / two-factor-next-example

Repositorio explicando como usar o 2FA com nest.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to use

We have 2 endpoints here. GET => localhost:3000/auth/qr-code => To get a QR Code and base32 that we will use in google authentication

curl -X 'GET' 'http://localhost:3000/auth/qr-code' -H 'accept: */*'

POST => localhost:3000/auth/validate/ => To validate our token with our base32

curl -d '{ "token": "token_input_here" }' -X 'POST' 'http://localhost:3000/auth/validate' -H 'accept: */*'

Installation

$ npm install

Running the app

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Stay in touch

  • Author - Albert
  • Instagram @albertb8

About

Repositorio explicando como usar o 2FA com nest.js


Languages

Language:TypeScript 86.2%Language:JavaScript 13.8%