webiny-cognito-federation
하는 일
이 스킬은 Webiny 프로젝트의 Cognito 로그인에 외부 신원 공급자를 추가할 때 AI를 안내합니다. Google이나 Entra ID 같은 공급자로 싱글 사인온을 원하는 개발자를 위한 스킬입니다.
사용하는 경우
- ✓Google, Facebook, Apple, Amazon 계정으로 Webiny 프로젝트에 로그인하게 하고 싶을 때.
- ✓Cognito를 OIDC를 사용하는 회사 신원 공급자에 연결하고 싶을 때.
- ✓연합 공급자를 위해 관리자 로그인 화면을 맞춤 설정해야 하는 경우.
스킬 링크
https://github.com/webiny/webiny-js/blob/next/skills/user-skills/cognito-federation/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“우리 팀이 Cognito를 통해 Google 계정으로 Webiny 관리자에 로그인하게 해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
이 스킬은 설정 파일의 Cognito 확장 기능에 연합 설정을 추가하는 방법을 설명합니다. 그러면 인프라와 로그인 버튼이 설정되고, 연합 사용자는 Webiny에 자동으로 동기화됩니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 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 |
자주 묻는 질문
Cognito는 사용자 풀로 남나요?
네. 외부 공급자가 로그인을 처리하는 동안 Cognito는 사용자 풀로 남는다고 스킬이 설명합니다.
어떤 공급자가 나열되어 있나요?
Google, Facebook, Apple, Amazon, 그리고 Entra ID 같은 OIDC 공급자입니다.
로그인 동작을 맞춤 설정할 수 있나요?
네. 신원 매핑과 로그인 화면을 위한 선택적 API 및 관리자 설정으로 할 수 있습니다.
상세 정보
작성자의 원본 설명
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
인기도
- GitHub 스타
- 8.1k
- 순위
- #12594
- 라이선스
- —
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
prd-to-plan
8.1k에이전트가 제품 요구사항 문서를 작고 끝까지 이어지는 조각들로 된 단계별 계획으로 바꿔 Markdown 파일로 저장하도록 돕습니다.
webiny-admin-architect
8.1k에이전트에게 Webiny 플랫폼의 관리자 화면을 비즈니스 로직 계층과 프레젠터 패턴으로 만드는 방법을 가르칩니다.
webiny-admin-permissions
8.1k에이전트에게 Webiny 관리자 화면에 권한 제어를 추가하는 법을 가르칩니다. 스키마에서 권한 양식을 자동 생성하고 표시 여부를 확인합니다.
webiny-form-model
8.1k에이전트에게 선언형 필드 빌더, 레이아웃, 검증, 조건부 규칙으로 Webiny 양식을 만드는 법을 가르칩니다.