Aws Cognito React screenshot

Aws Cognito React

Author Avatar Theme by Dbroadhurst
Updated: 4 Oct 2022
336 Stars

AWS Cognito React boilerplate / reference implementation

Overview

The aws-cognito-react v2signin is a reference implementation and boilerplate for managing AWS Cognito user management. It has undergone some significant changes in its v2 release, including the switch to Typescript, replacement of redux and saga’s with react context, upgrade to the latest major versions of all libraries, and the addition of AWS CDK to manage infrastructure. It also features a cleaner and simpler architecture, responsive design, and the use of hooks to manage states.

Features

  • Upgrade to Typescript for improved type safety and developer experience
  • Replaced redux and saga’s with react context for state management
  • Upgraded all libraries to latest major versions for improved performance and compatibility
  • Added AWS CDK to manage infrastructure for easier deployment and management
  • Cleaner and simpler architecture for easier maintenance and development
  • Responsive design for optimal user experience across different devices

Installation

  1. Clone the repository and switch to the v2 branch if you are looking for the v1 version.
  2. Set up the AWS Cognito infrastructure by following the instructions in the provided Amazon Cloud Development (CDK) script.
  3. After deployment, navigate to the command line window and copy the userPoolId and userPoolClientId values.
  4. Create a app/.env.local file and add the following Cognito environment values:
    COGNITO_USER_POOL_ID=<userPoolId>
    COGNITO_USER_POOL_CLIENT_ID=<userPoolClientId>
    
  5. Set up the development environment using Create React App or any other preferred method.

Summary

The aws-cognito-react v2signin provides a reference implementation and boilerplate for managing AWS Cognito user management. With its v2 release, it has improved its architecture, state management, and overall user experience. It also includes AWS CDK for easier infrastructure management. Developers can follow the provided installation guide to set up the theme and start managing AWS Cognito user management efficiently.