https://github.com/konsumer/aws-cognito-example
Basic usage of amazon-cognito-identity with modern javascript tooling
https://github.com/konsumer/aws-cognito-example
Last synced: 9 months ago
JSON representation
Basic usage of amazon-cognito-identity with modern javascript tooling
- Host: GitHub
- URL: https://github.com/konsumer/aws-cognito-example
- Owner: konsumer
- License: mit
- Created: 2016-08-09T21:57:50.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2017-06-08T19:13:05.000Z (about 9 years ago)
- Last Synced: 2025-02-28T14:56:38.273Z (over 1 year ago)
- Language: JavaScript
- Size: 24.4 KB
- Stars: 29
- Watchers: 3
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# aws-cognito-example
Basic usage of [amazon-cognito-identity](https://github.com/aws/amazon-cognito-identity-js) with modern javascript tooling, react, and the npm ecosystem.
You can use it as a boilerplate for your next kickass AWS-based ES6 serverless react/redux site.
## getting started
* configure
* `npm install` to install dependencies
* `npm start` to start a development webserver
* `npm run build` to create an optimized static site, ready for deployment, in `webroot/`.
## configuration
Make a `.env` file that looks like this:
```
AWS_REGION=us-west-2
AWS_IDENTITYPOOL=us-west-2_BADWOLFBADWOLF
AWS_CLIENTAPP=badwolfbadwolfbadwolfbadwo
```
1. Create an app for your user pool. Note that the generate client secret box must be **unchecked** because the JavaScript SDK doesn't support apps that have a client secret.
2. Set the above variables from your AWS console, under Cognito User Pools, replacing the Doctor Who reference with your own stuff.
3. Install all the dependencies with `npm install`
4. Run the app with `npm start`, and click the links.
5. Once you get your app working the way you want, run `npm run build` and deploy the `webroot/` folder on any static webhost (like S3 or whatever.)