Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dbroadhurst/aws-cognito-react
AWS Cognito React boilerplate / reference implementation
https://github.com/dbroadhurst/aws-cognito-react
account aws cognito react redux sagas users
Last synced: 3 days ago
JSON representation
AWS Cognito React boilerplate / reference implementation
- Host: GitHub
- URL: https://github.com/dbroadhurst/aws-cognito-react
- Owner: dbroadhurst
- License: mit
- Created: 2017-08-21T15:30:22.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-03-05T16:52:02.000Z (over 1 year ago)
- Last Synced: 2024-09-21T20:55:10.612Z (about 2 months ago)
- Topics: account, aws, cognito, react, redux, sagas, users
- Language: TypeScript
- Homepage: http://aws-cognito-react.s3-website-us-west-2.amazonaws.com/
- Size: 8.46 MB
- Stars: 330
- Watchers: 6
- Forks: 104
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# aws-cognito-react - v2
![signin](./logo.png)
If you are looking for v1 version it can be found on the legacy branch. With the release of v2, v1 is no longer supported
Reference implementation / boilerplate for AWS Cognito user management
## Demo
[aws-cognito-react-demo](http://aws-cognito-react.s3-website-us-west-2.amazonaws.com/)
## v2 Changes
- Switched to Typescript
- Replaced redux and saga's with react context
- Upgraded all libraries to latest major versions
- No security scan issues
- Hooks used to manage states
- Updated to Material UI 4x
- Added AWS CDK to manage infrastructure
- Cleaner and simpler Architecture
- Responsive design## AWS Cognito Infrastructure setup
To help deploy the AWS Cognito infrastructure I've create an Amazon Cloud Development (CDK) script
CDK set up instructions can be found [here](https://docs.aws.amazon.com/cdk/latest/guide/cli.html)
CDK deploy instructions
```bash
cd cdk
npm run cdk bootstrap # only needed first time
npm run cdk deploy
```After deployment copy the userPoolId and userPoolClientId values from the command line window; you will need these values in the app config step
## App Configuration
Setup the Cognito environment values buy creating app/.env.local file and adding the following
```bash
REACT_APP_USERPOOL_ID=YOUR_USER_POOL_ID
REACT_APP_CLIENT_ID=YOUR_CLIENT_ID
```Create React App has been used to setup the development process so the next steps should be familiar
```bash
cd app
npm install
npm start
```## Other Solutions
[Firebase Auth](https://firebase.google.com/products/auth?gclid=Cj0KCQiAtqL-BRC0ARIsAF4K3WFgWD7NC4y4eJfdGZg68t4ovEoqpGrqWWk2kj1_htu5e2844DCBKVoaAhl_EALw_wcB) - Great for mobile and web. Fairly limited but easy to use. Integrates really nicely with other Firebase services
[Auth0](https://auth0.com/) - Comes with comprehensive and feature rich frontend. Seems to quicky get expensive but a very safe option
[Keycloak](https://www.keycloak.org/) - Excellent feature rich Enterprise service that offers fully themable frontend. No Cloud solution but easy to deploy to AWS using [this](https://github.com/dbroadhurst/aws-cdk-fargate-keycloak) CDK script
## Useful References