Skip to content

Aws Cognito login example with react-router, created to be used as an example for use in other applications. Meant to be used as an easy starting point for anyone who needs an app with login and protected routing

Notifications You must be signed in to change notification settings

BigHeartConsulting/aws-cognito-login

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project was bootstrapped with Create React App.

Getting Started

Go to the AWS Cognito console and create a new user pool. Click review defaults. You may want to consider how strong to make your password requirements here.

Click Add app client. Make sure that Generate client secret is unchecked, then create an app client. Then click return to pool details

Click Create pool

Click Users and groups under General Settings and create a user

In the project directory, make a file called .env with the contents:

REACT_APP_CLIENT_ID="your Cognito app client id"

REACT_APP_POOL_ID="your Cognito user pool id"

The app client id can be found in App clients under General settings and the user pool id can be found in General settings in the AWS Cognito console.

In the project directory, run:

npm install and npm start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

About

Aws Cognito login example with react-router, created to be used as an example for use in other applications. Meant to be used as an easy starting point for anyone who needs an app with login and protected routing

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published