https://github.com/davidgf/serverless-cognito
Example of how you can integrate Cognito User Pools in your Serverless service
https://github.com/davidgf/serverless-cognito
Last synced: over 1 year ago
JSON representation
Example of how you can integrate Cognito User Pools in your Serverless service
- Host: GitHub
- URL: https://github.com/davidgf/serverless-cognito
- Owner: davidgf
- Created: 2019-02-15T18:02:21.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-12-22T09:45:40.000Z (over 3 years ago)
- Last Synced: 2025-02-14T20:45:17.306Z (over 1 year ago)
- Language: HTML
- Homepage: https://medium.com/@Da_vidgf/using-cognito-for-users-management-in-your-serverless-application-1695fec9e225
- Size: 84 KB
- Stars: 64
- Watchers: 4
- Forks: 21
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Serverless Cognito
## Setup
1. `serverless deploy`
Besides deploying the service, we need to manually configure some details, since CloudFormation falls short. So, in the Cognito Dashboard, select the User Pool and follow the steps below:
1. Select "App client settings", enable Cognito User Pool as a provider and enter the callback and sign out URLs. Select "Implicit grant" as allowed OAuth flow and tick all the scopes
2. Select "Domain name" and create one
## Usage
1. Open a web browser and go to `https:///login?response_type=token&client_id=&redirect_uri=`
2. After loging in successfully, you'll be redirected to your calback URL with `id_token` in the query string
3. Put `id_token` in the `Authorization` HTTP header when submitting requests to the API