React Authentication in Depth

Nader Dabit
6 min readMar 13, 2018

How to implement world 2 factor authentication (both email and TOTP) using React, React Router, and Amazon Cognito

To view Part 2, implementing React Router & TOTP, click here.

In this post, we’ll walk through how to implement real world user sign up and sign in with two factor authentication along with a routing and an authentication flow in a React web application.

When the user is logged out, we will protect certain routes from being accessed and redirect them to sign in, and allow access these protected routes only when a…

--

--

Nader Dabit

Full Stack Product Engineer, Author, Teacher, Director of Developer Relations at Avara