Authentication and user management API based on AWS Cognito
CognitoApi lets you build your applications without thinking about the authentication part. Based on the solid AWS Cognito service, it provides a complete REST API for user registration, login with MFA, password reset, and user management. Free for the first 50K monthly active users.
export AWS_PROFILE=MyAwsDevProfile git clone https://github.com/TocConsulting/cognito-api.git cd terraform ENVIRONMENT=dev make plan ENVIRONMENT=dev make apply
| Endpoint | Description |
|---|---|
POST /v1/users | Create a new user |
POST /v1/users/{id}/confirm | Confirm new user with temp password |
POST /v1/users/{id}/confirm-mfa | Confirm MFA setup |
POST /v1/login | Initial login step |
POST /v1/mfa-verify | Complete MFA verification |
POST /v1/refresh-token | Get new tokens using refresh token |
GET /v1/userinfo | Get authenticated user info |
POST /v1/forgot-password | Initiate password reset |
POST /v1/logout | Log out user |
| Resource | Count | Purpose |
|---|---|---|
| API Gateway | 1 | REST API exposure |
| Cognito User Pool | 1 | User management |
| Lambda Functions | 16 | API backend |
| Lambda Layers | 6 | Shared code |
| S3 Buckets | 2 | Terraform state & MFA QR codes |
| DynamoDB Table | 1 | Terraform lock |
| ACM Certificate | 1 | API HTTPS |
We can help you deploy and customize this tool for your specific needs, or build custom solutions.
Contact Us