aws-auth

Configure user authentication for web and mobile apps with Amazon Cognito and Amplify.

Updated Sep 8, 2026
One-click install
npx skills add https://github.com/dennisvink/yolomancer --skill aws-auth-dennisvink
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: aws-auth
Source: https://github.com/dennisvink/yolomancer/tree/main/skills/aws/core-skills/aws-auth
Command: npx skills add https://github.com/dennisvink/yolomancer --skill aws-auth-dennisvink

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Adding sign-up, sign-in, MFA, social login, and API authorization to an application involves many Cognito concepts (user pools vs identity pools, OAuth flows, token handling) that are easy to misconfigure, leading to broken logins, security gaps, and silent configuration wipes. ## Core Features & Use Cases - User pool and app client setup: Create user pools with password policies, MFA (TOTP), custom attributes, groups, and public or confidential app clients with correct auth flows. - Hosted UI, OAuth, and federation: Configure managed login, authorization code + PKCE, client credentials, social/SAML identity providers, custom domains, and multi-tenant IdP routing. - Tokens, sessions, and API protection: Handle ID/access/refresh tokens, rotation, revocation, sign-out, and gate API Gateway or ALB routes with Cognito/JWT authorizers. - Use Case: Add Google social login to a React app by creating a user pool with a public app client, registering Google as an identity provider with attribute mapping, and wiring the Amplify client library with the hosted UI code + PKCE flow. ## Quick Start Use the aws-auth skill to add Cognito sign-up and sign-in with Google social login to my React app.

Frequently Asked Questions about aws-auth

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add sign-up and login to a React app with Amazon Cognito?

Create a Cognito user pool with a public app client (no secret), enable the hosted UI or managed login with the authorization code grant plus PKCE, and wire the Amplify client auth library. The Amplify library handles the code exchange, token storage, and automatic refresh.

What is the difference between a Cognito user pool and an identity pool?

A user pool authenticates users and issues JWTs, acting as an OIDC identity provider. An identity pool exchanges a token for temporary AWS credentials via STS, and is only needed when the client must call AWS services like S3 or DynamoDB directly.

How do I protect an API Gateway API with Cognito tokens?

For HTTP APIs, add a JWT authorizer with the issuer set to your user pool URL and the audience set to the app client id. For REST APIs, use a Cognito user pools authorizer, which validates the ID token by default.

Why does Cognito login fail with redirect_mismatch?

The callback URL is not registered exactly on the app client; scheme, host, path, trailing slash, and case all must match. Add the exact callback URL to the client's Allowed callback URLs, using HTTP only for localhost loopback addresses.

Should I store Cognito refresh tokens in localStorage?

Avoid localStorage for high-value apps because any injected script can read it via XSS. Prefer cookieStorage with Secure and SameSite=Strict, keep refresh token lifetimes short, and enable refresh token rotation plus token revocation on the app client.

When should I not use this Cognito auth approach?

This skill does not cover Amplify Gen2 backend definitions (defineAuth, npx ampx), IAM policy or STS role authoring, or IAM Identity Center. It also excludes API Gateway route and Lambda implementation beyond the Cognito/JWT authorizer configuration.