This application was created from the create-react-app script, and demonstrates how to integrate the AWS Cognito hosted / built in sign-in and sign-up UI content with a React application. See my article AWS Cognito example using React UI and Node.js REST APIs — part 2 (React UI app with Redux) for more information.
- Modify
src/config/app-config.json
to match your user pool and application URLs. When running locally, thesignoutUri
will property need to behttp://localhost:3000/
and thecallbackUri
property will need to behttp://localhost:3000/callback
. - Run
npm install
to setup and install the dependencies. - Run
npm start
to start the application. - A browser session should automatically open, pointing at
http:localhost:3000
.
This application will attempt to invoke a simple example REST API using the JWT access code returned in the callback from Cognito. See the repo at https://github.com/arronharden/cognito-demo-service for the implementation of this REST API. A running instance of this REST API is hosted at https://cognito-demo-api.arronharden.com.
A running instance of this React application is hosted at https://cognito-demo.arronharden.com.
I'm a cloud/SaaS architect and lead full stack engineer, living in Milton Keynes (UK). More information about me can be found on my profile at https://arronharden.com.