webiny-cognito-federation
What it does
This skill guides your AI when adding external identity providers to a Webiny project's Cognito login. It is for developers who want single sign-on with providers such as Google or Entra ID.
When to use it
- βWhen you want users to sign in to a Webiny project with Google, Facebook, Apple or Amazon.
- βWhen you want Cognito to connect to a company identity provider using OIDC.
- βWhen you need to customize the admin login screen for federated providers.
Skill link
https://github.com/webiny/webiny-js/blob/next/skills/user-skills/cognito-federation/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βLet our team sign in to the Webiny admin with Google accounts through Cognito.β
5 new skills a week. 1 minute to read.
How it works
The skill explains adding a federation setting to the Cognito extension in the configuration file. That sets up the infrastructure and the login buttons, and federated users are synced into Webiny automatically.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Cognito Federation
TL;DR
Webiny supports federated sign-in through Cognito β users authenticate via external identity providers (Google, Entra ID, etc.) while Cognito remains the user pool. Configure it by adding a federation prop to <Cognito /> in webiny.config.tsx. This handles both infrastructure (Cognito User Pool Domain, IdP resources, OAuth client) and the admin login screen (provider buttons, OAuth for Amplify). Federated users are auto-detected and synced into Webiny. For advanced use cases, provide apiConfig (custom identity mapping) and/or adminConfig (custom login screen behavior).
Pattern / Core Concept
Cognito Federation has three layers:
Infrastructure β The
federationprop on<Cognito />, under the hood, creates the Cognito User Pool Domain, Identity Provider resources, and configures OAuth on the User Pool Client.Admin Login Screen β The federation config is passed as an
Admin.BuildParamto the admin app. ACognitoSignInConfigabstraction provides the login screen with provider buttons, OAuth settings for Amplify, and credentials visibility. By default, this is auto-generated from thefederationprop. For advanced customization (IP whitelists, async logic), provide anadminConfigextension.API Identity β Federated tokens are auto-detected via the
identitiesJWT claim and markedexternal: true. TheExternalIdpUserSyncHandlerauto-creates/updates users on login. For custom role/team mapping, provide anapiConfigextension implementingCognitoIdpConfig.
How Federated Login Works
- User clicks a provider button on the login screen
signInWithRedirect()redirects to Cognito Hosted UI- Cognito redirects to the external IdP (Google, Entra ID, etc.)
- After authentication, Cognito creates an
idTokenwith anidentitiesclaim - The admin app picks up the session via
fetchAuthSession() - The API detects
identitiesin the token, setsexternal: true ExternalIdpUserSyncHandlercreates/updates the Webiny user with roles/teams
Reference Tables
<Cognito /> Props
| Prop | Type | Description |
|---|---|---|
federation |
object | () => Promise<object> |
Federation config (see below) β sync or async |
mfa |
boolean |
Enable TOTP MFA for all users (default: false) |
apiConfig |
string |
Path to API identity mapping extension |
adminConfig |
string |
Path to Admin login customization extension |
federation Object
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
domain |
string |
Yes | β | Cognito User Pool domain prefix |
callbackUrls |
string[] |
Yes | β | OAuth callback/redirect URLs |
logoutUrls |
string[] |
No | callbackUrls |
OAuth logout redirect URLs |
responseType |
"code" | "token" |
No | "code" |
OAuth response type |
allowCredentialsLogin |
boolean |
No | true |
Show email/password form |
identityProviders |
array |
Yes | β | List of federated IdPs |
identityProviders[] Items
| Field | Type | Required | Description |
|---|---|---|---|
type |
"google" | "facebook" | "amazon" | "apple" | "oidc" |
Yes | Provider type |
name |
string |
No | Custom provider name (required for OIDC) |
label |
string |
Yes | Button text on the login screen |
| `providerDeta |
FAQ
Does Cognito stay as the user pool?
Yes. The skill says Cognito remains the user pool while external providers handle sign-in.
Which providers are listed?
Google, Facebook, Apple, Amazon and OIDC providers such as Entra ID.
Can login behavior be customized?
Yes, through optional API and admin configuration for identity mapping and the login screen.
Details
Original description by the author
Configuring Cognito Federation for Webiny projects β federated sign-in via external identity providers (Google, Facebook, Apple, Amazon, OIDC/Entra ID) while keeping Cognito as the user pool. Use this skill when the developer asks about Cognito federation, SSO with Cognito, adding Google/Microsoft/OIDC login to Cognito, federated identity providers, CognitoSignInConfig, CognitoIdpConfig, external users, signInWithRedirect, OAuth redirect URLs, hiding the password form, allowCredentialsLogin, or customizing the federated login screen.
repo: webiny/webiny-js
Popularity
- GitHub stars
- 8.1k
- Ranking position
- #12594
- License
- β
- Updated
- 11/2/2026
Comments
- β¦
More skills from this repository
prd-to-plan
8.1kHelps your agent turn a product requirements document into a phased plan of small end-to-end slices, saved as a Markdown file.
webiny-admin-architect
8.1kTeaches your agent how to build admin screens for the Webiny platform, using its business logic layers and presenter pattern.
webiny-admin-permissions
8.1kTeaches your agent to add permission controls to Webiny admin screens, including auto-generated permission forms and hide-or-show checks.
webiny-form-model
8.1kTeaches your agent to build forms in Webiny using a declarative field builder, layouts, validation and conditional rules.
Similar skills
reverse-engineer-anything
422kHelps your agent look inside shipped apps and packages to explain features, compare versions, or guide a rebuild, using the REA tool.
1password
394kHelps your agent set up the 1Password CLI, sign in, and read or inject secrets without printing their values into chat.
healthcheck
394kHelps your agent audit the computer or server that runs OpenClaw for security risks, such as SSH, firewall, updates, and backups, then suggest safe fixes.