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.
- NodeJS 14+ and NPM to run this project donwload here
- AWS Cognito user pool
- AWS S3 bucket
1) Clone the repository
git clone https://github.com/riosje/react-login
cd react-loginnpm cimodule.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 start5) 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 build6) OPTIONAL: install a webserver locally to test the builded application, execute the following commands
npm install -g serve
serve -s build -l 4000