Skip to content
Starter projects for developers looking to build web & mobile applications that have Authentication & protected routing
JavaScript HTML CSS
Branch: react
Clone or download
Latest commit 386aaf1 Aug 16, 2019

This is the React Starter

To view the Vue starter, click here.

To view the React Native starter, click here.

AWS Amplify React Authentication Starter

This project includes:

  • User sign up
  • User sign in
  • 2 factor authentication
  • Real world auth flow using React Router
  • Protected routes
  • Redirects for unauthorized users
  • Time-based one time password (TOTP)

Getting started

One click deploy


Choose react branch.

Manual setup

Initial setup

  1. Make sure you are on a new version of the AWS Amplify CLI to be sure you have multiple environment support.
npm install -g @aws-amplify/cli
  1. clone the project
git clone
  1. Check out the React branch
git checkout react
  1. install dependencies using npm or yarn
npm install
  1. Start project
npm start

Setting up back end AWS services

If you do not have your AWS services already created, follow these steps. If you already have your services set up, just configure your aws-exports.js file.

  1. From the root of the project, initialize the Amplify project
amplify init
  1. Create the resources in your account
amplify push

Enabling MFA

  1. Visit the Amazon Cognito User Pool Dashboard & click on your user pool.
amplify console auth
  1. Click on MFA & verifications

  2. Do you want to enable Multi-Factor Authentication (MFA)? Optional

You can’t perform that action at this time.