API with NestJS #31. Two-factor Authentication

API with NestJS #31. Two-factor Authentication

API with NestJS #31. Two-factor Authentication - We go through the principles of two-factor authentication and put them into practice with NestJS and Google Authenticator.

  • 1.  API with NestJS #1. Controllers, routing and the module structure
  • 2.  API with NestJS #2. Setting up a PostgreSQL database with TypeORM
  • 3.  API with NestJS #3. Authenticating users with bcrypt, Passport, JWT, and cookies
  • 4.  API with NestJS #4. Error handling and data validation
  • 5.  API with NestJS #5. Serializing the response with interceptors
  • 6.  API with NestJS #6. Looking into dependency injection and modules
  • 7.  API with NestJS #7. Creating relationships with Postgres and TypeORM
  • 8.  API with NestJS #8. Writing unit tests
  • 9.  API with NestJS #9. Testing services and controllers with integration tests
  • 10.  API with NestJS #10. Uploading public files to Amazon S3
  • 11.  API with NestJS #11. Managing private files with Amazon S3
  • 12.  API with NestJS #12. Introduction to Elasticsearch
  • 13.  API with NestJS #13. Implementing refresh tokens using JWT
  • 14.  API with NestJS #14. Improving performance of our Postgres database with indexes
  • 15.  API with NestJS #15. Defining transactions with PostgreSQL and TypeORM
  • 16.  API with NestJS #16. Using the array data type with PostgreSQL and TypeORM
  • 17.  API with NestJS #17. Offset and keyset pagination with PostgreSQL and TypeORM
  • 18.  API with NestJS #18. Exploring the idea of microservices
  • 19.  API with NestJS #19. Using RabbitMQ to communicate with microservices
  • 20.  API with NestJS #20. Communicating with microservices using the gRPC framework
  • 21.  API with NestJS #21. An introduction to CQRS
  • 22.  API with NestJS #22. Storing JSON with PostgreSQL and TypeORM
  • 23.  API with NestJS #23. Implementing in-memory cache to increase the performance
  • 24.  API with NestJS #24. Cache with Redis. Running the app in a Node.js cluster
  • 25.  API with NestJS #25. Sending scheduled emails with cron and Nodemailer
  • 26.  API with NestJS #26. Real-time chat with WebSockets
  • 27.  API with NestJS #27. Introduction to GraphQL. Queries, mutations, and authentication
  • 28.  API with NestJS #28. Dealing in the N + 1 problem in GraphQL
  • 29.  API with NestJS #29. Real-time updates with GraphQL subscriptions
  • 30.  API with NestJS #30. Scalar types in GraphQL
  • 31. API with NestJS #31. Two-factor authentication

While developing our application, security should be one of our main concerns. One of the ways we can improve it is by implementing a two-factor authentication mechanism. This article goes through its principles and puts them into practice with NestJS and Google Authenticator.

Adding two-factor authentication

The core idea behind two-factor authentication is to confirm the user’s identity in two ways. There is an important distinction between two-step authentication and two-factor authentication. A common example is with the ATM. To use it, we need both a credit card and a PIN code. We call it a two-factor authentication because it requires both something we have and something we know. For example, requiring a password and a PIN code could be called a two-step flow instead.

javascript nestjs typescript

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

What is TypeScript? Why TypeScript? and Why Not TypeScript?

TypeScript extends JavaScript by adding Types. There are many great reasons to switch to TypeScript. Especially if your team uses JavaScript. There are some reasons to not use TypeScript as there are with any language or framework.

Will TypeScript Replace JavaScript? Learn TypeScript | TypeScript Tutorial 2021

In today's video, I'm gonna show you all the basic concepts you need to know to be successful with TypeScript as well as how you can start using TypeScript right away with React. TypeScript will make you a better JavaScript developer for several reasons. You’ll feel confident when writing code. Fewer errors will appear in your production code. It will be easier to refactor code. You’ll write fewer tests. And overall, you’ll have a better coding experience in your editor.

Building Modern Nodejs Application using Nestjs and TypeScript

Building Modern Nodejs Application using Nestjs and TypeScript - In this article, we will see how to build REST API using Nestjs with TypeScript. Building Modern Nodejs Application using Nestjs and TypeScript

Hire Dedicated JavaScript Developers -Hire JavaScript Developers

Hire dedicated JavaScript Developers who are proficient in AngularJS, ReactJS, NodeJS, & VueJS frameworks. Get flexible hiring models as per your business requirements.

TypeScript Tutorial For JavaScript Developers - TypeScript Basics

TypeScript Tutorial For JavaScript Developers - TypeScript Basics. I will show you guys 4 example of JavaScript code, and how to convert it to TypeScript. This is a typescript beginners tutorial.