Skip to content

POC about how to integrate AWS cognito using Amplify UI components for React

Notifications You must be signed in to change notification settings

riosje/react-login

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Login with React + AWS amplify - Proof Of Concept

This project is a proof of concept about how to implement a simple login page with React integrated with AWS Cognito trough the AWS amplify framework, and is limited only to the cognito integration is not intended to be integrated with the AWS amplify service.

Frameworks and libs used

Pre-requisites to run the project

  • NodeJS 14+ and NPM to run this project donwload here
  • AWS Cognito user pool
  • AWS S3 bucket

Getting started

1) Clone the repository

git clone https://github.com/riosje/react-login
cd react-login

2) Install project the dependencies

npm ci

3) configure the aws-exports.js file with your cognito

module.exports = {
region:  'us-west-2',
userPoolId:  'us-west-2_XXXX',
userPoolWebClientId:  'XXXXXXXX',
authenticationFlowType:  'USER_PASSWORD_AUTH',
mandatorySignIn:  true,
};

4) test the application executing the following command which start a server with debug capabilities, the server is tarted in the following address http://localhost:3000

npm start

5) build the application for production deployment, this will create a folder build with all the static file ready to be deployed into a web server

npm run build

6) OPTIONAL: install a webserver locally to test the builded application, execute the following commands

npm install -g serve 
serve -s build -l 4000

About

POC about how to integrate AWS cognito using Amplify UI components for React

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published