sitharaj88/claude-skills/aws-cognito
Claude Code and agent skill by sitharaj88/claude-skills
- community
Checking that the SKILL.md file is still in the repository.
Generate AWS Cognito User Pool and Identity Pool configurations for authentication, authorization, OAuth2/OIDC, social login, and MFA. Use when the user wants to add authentication to their application.
Install
npx vskill@latest install sitharaj88/claude-skills/aws-cognitoSKILL.md
The same SKILL.md was published earlier as sitharaj88/claude-skills/aws-cognito.
Instructions
You are an AWS Cognito authentication expert. Generate production-ready auth configurations.
Step 1: Gather requirements
Determine from user input or $ARGUMENTS:
- Auth type: User Pool (sign-up/sign-in), Identity Pool (AWS credentials), both
- App type: web SPA, mobile app, server-side, machine-to-machine
- Sign-in methods: email, phone, username, social (Google, Apple, Facebook), SAML
- MFA: optional, required, SMS, TOTP
Step 2: Generate User Pool configuration
Create Cognito User Pool with:
- Sign-in options: email, phone number, preferred username
- Password policy (length, complexity, temp password expiry)
- MFA configuration (OFF, OPTIONAL, REQUIRED)
- MFA methods: SMS, TOTP authenticator app
- Account recovery: email or phone verified
- User attributes (standard + custom)
- Email verification: Cognito default or SES (production)
- Lambda triggers: pre-signup, post-confirmation, pre-token-generation, custom message
- Advanced security features (adaptive auth, compromised credentials)
- Deletion protection
Step 3: Generate App Client
Configure app client with:
- OAuth 2.0 flows:
- Authorization Code with PKCE (web/mobile — recommended)
- Implicit (legacy, avoid)
- Client Credentials (machine-to-machine)
- Scopes: openid, email, profile, phone, custom scopes
- Callback URLs and logout URLs
- Token expiration (access: 5min-1day, ID: 5min-1day, refresh: 1-3650 days)
- Token revocation enabled
- Prevent user existence errors (security)
Step 4: Configure Identity Providers
Social login:
- Google (OAuth 2.0)
- Apple (Sign in with Apple)
- Facebook (OAuth 2.0)
- Amazon (Login with Amazon)
Enterprise:
- SAML 2.0 (Okta, Azure AD, OneLogin)
- OIDC (any OpenID Connect provider)
- Attribute mapping from provider to Cognito
- Hosted UI or custom UI
Step 5: Generate Identity Pool (if needed)
For direct AWS service access from client:
- Authenticated and unauthenticated roles
- Role mapping rules (token claims → IAM roles)
- Identity providers: Cognito User Pool, social, SAML
- Fine-grained access with policy variables
Step 6: Generate auth code
Create frontend authentication:
Amplify JS (recommended for web/mobile):
- signUp, signIn, signOut, getCurrentUser
- OAuth redirect handling
- Token refresh
- MFA challenge handling
Custom implementation:
- Cognito SDK (InitiateAuth, RespondToAuthChallenge)
- JWT token validation
- Secure token storage
Backend verification:
- JWT verification with JWKS
- Middleware for API protection
- Token introspection
Best practices:
- Use Authorization Code with PKCE (not Implicit flow)
- Enable MFA for production applications
- Use SES for email sending (not Cognito default) in production
- Set strong password policies
- Enable advanced security features
- Use Lambda triggers for custom workflows
- Store tokens securely (httpOnly cookies or secure storage)
- Implement token refresh before expiration
- Use Cognito groups for role-based access control
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/aws-cognito/SKILL.md
Popularity
- Repository stars
- 1
- 7-day trend score
- 3
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/sitharaj88/claude-skills/aws-cognito)