{"id":21731045,"url":"https://github.com/raphaelbh/aws-cognito","last_synced_at":"2026-05-06T21:43:41.897Z","repository":{"id":135190880,"uuid":"451626403","full_name":"raphaelbh/aws-cognito","owner":"raphaelbh","description":"Proof of concept to demonstrate how to use AWS Cognito.","archived":false,"fork":false,"pushed_at":"2022-02-25T11:58:22.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-25T20:11:28.652Z","etag":null,"topics":["access-token","auth","authentication","authorization","aws","cognito","docker","python","user-pool"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/raphaelbh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-01-24T20:42:34.000Z","updated_at":"2022-02-24T17:35:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"4c2ae113-e1c0-4f86-8d8d-6a5e71fe24aa","html_url":"https://github.com/raphaelbh/aws-cognito","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphaelbh%2Faws-cognito","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphaelbh%2Faws-cognito/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphaelbh%2Faws-cognito/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphaelbh%2Faws-cognito/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/raphaelbh","download_url":"https://codeload.github.com/raphaelbh/aws-cognito/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244708006,"owners_count":20496826,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["access-token","auth","authentication","authorization","aws","cognito","docker","python","user-pool"],"created_at":"2024-11-26T04:19:29.408Z","updated_at":"2026-05-06T21:43:41.860Z","avatar_url":"https://github.com/raphaelbh.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AWS Cognito\n\n[![Project Status](https://img.shields.io/static/v1?label=project%20status\u0026message=complete\u0026color=success\u0026style=flat-square)](#)\n[![GitHub License](https://img.shields.io/github/license/raphaelbh/aws-cognito?style=flat-square)](#)\n\nProof of concept to demonstrate how to use AWS Cognito.\n\n\u003e Amazon Cognito provides authentication, authorization, and user management for your web and mobile apps. Your users can sign in directly with a user name and password, or through a third party such as Facebook, Amazon, Google or Apple.\n\nFeatures:\n- sign up\n- confirm sign up\n- sign in (initiate auth)\n- sign out (global)\n- get user\n- delete user\n\n## Requirements\n\n[![docker](https://img.shields.io/badge/Docker-2CA5E0?style=for-the-badge\u0026logo=docker\u0026logoColor=white)](https://www.docker.com/)\n\n## Installation\n\n```bash\n# aws-cli config\n$ alias aws='docker run --rm -it -v ~/.aws:/root/.aws -v $(pwd):/aws amazon/aws-cli'\n$ aws configure set aws_access_key_id ${your_aws_access_key_id}\n$ aws configure set aws_secret_access_key ${your_aws_secret_access_key}\n$ aws configure set region ${your_aws_default_region}\n\n# create stack (user pool)\n$ aws cloudformation create-stack --stack-name poc-cognito --template-body file://infrastructure/cloudformation/stack.yaml\n\n# get user_pool_id and user_pool_client_id\n$ aws cloudformation describe-stacks --stack-name poc-cognito\n```\n    \n## Environment Variables\n\nSet the follow env variables (./application/.env)\n\n`AWS_ACCESS_KEY_ID`\n\n`AWS_SECRET_ACCESS_KEY`\n\n`AWS_DEFAULT_REGION`\n\n`USER_POOL_ID`\n\n`USER_POOL_CLIENT_ID`\n\n## Usage\n\n```python\nimport services.cognito as cognito\n\nuser = {\n    'username':  \"john@poc.com\",\n    'password': 'john@password',\n    'attributes': [{\n        'Name': 'name',\n        'Value': \"John Doe\"\n    }, {\n        'Name': 'email',\n        'Value': \"john@poc.com\"\n    }]\n}\n\ncognito.sign_up(user)\ncognito.admin_confirm_sign_up(user)\n\nresponse = cognito.initiate_auth(user)\naccess_token = response['body']['access_token']\n```\n\n## Tests\n\n```bash\n$ export PYTHONPATH=application \n$ pytest --cache-clear tests/\n```\n\n## Tech Stack\n\n[![docker](https://img.shields.io/badge/Docker-2CA5E0?style=for-the-badge\u0026logo=docker\u0026logoColor=white)](https://www.docker.com/)\n[![aws](https://img.shields.io/badge/Amazon_AWS-FF9900?style=for-the-badge\u0026logo=amazonaws\u0026logoColor=white)](https://aws.amazon.com/)\n\n## Reference\n\n- https://docs.aws.amazon.com/cognito/latest/developerguide/what-is-amazon-cognito.html\n- https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/cognito-idp.html\n\n## Feedback\n\nIf you have any feedback, please contact me at raphaeldias.ti@gmail.com\n\n[![github](https://img.shields.io/badge/GitHub-100000?style=for-the-badge\u0026logo=github\u0026logoColor=white)](https://github.com/raphaelbh)\n[![linkedin](https://img.shields.io/badge/LinkedIn-0077B5?style=for-the-badge\u0026logo=linkedin\u0026logoColor=white)](https://www.linkedin.com/in/raphaelbh/)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraphaelbh%2Faws-cognito","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraphaelbh%2Faws-cognito","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraphaelbh%2Faws-cognito/lists"}