Skip to content
Example of User Authentication using React with React Router and AWS Amplify
JavaScript HTML CSS
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config initial commit Mar 8, 2018
public initial commit Mar 8, 2018
scripts initial commit Mar 8, 2018
src uncommented out TOTP code Mar 23, 2018
.gitignore
README.md updated readme Mar 23, 2018
package.json
yarn.lock

README.md

React Authentication Example

This repo goes along with the blog post React Authentication in Depth

Completed Project

This project features:

  • User sign up
  • User sign in
  • 2 factor authentication
  • Real world auth flow using React Router
  • Protected routes
  • Redirects for unauthorized users
  • TOTP

Getting started

  1. clone the project
git clone https://github.com/dabit3/react-authentication-in-depth.git
  1. install dependencies using npm or yarn
yarn || npm i
  1. Start project
npm start

Setting up 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, create awsmobile project
awsmobile init
  1. add user sign-in / authentication (Amazon Cognito)
awsmobile user-signin enable
  1. push new services to console
awsmobile push
You can’t perform that action at this time.