본문으로 건너뛰기
Skillpedia
보안8.1k · #12594

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가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/webiny/webiny-js/blob/next/skills/user-skills/cognito-federation/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

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:

  1. Infrastructure — The federation prop on <Cognito />, under the hood, creates the Cognito User Pool Domain, Identity Provider resources, and configures OAuth on the User Pool Client.

  2. Admin Login Screen — The federation config is passed as an Admin.BuildParam to the admin app. A CognitoSignInConfig abstraction provides the login screen with provider buttons, OAuth settings for Amplify, and credentials visibility. By default, this is auto-generated from the federation prop. For advanced customization (IP whitelists, async logic), provide an adminConfig extension.

  3. API Identity — Federated tokens are auto-detected via the identities JWT claim and marked external: true. The ExternalIdpUserSyncHandler auto-creates/updates users on login. For custom role/team mapping, provide an apiConfig extension implementing CognitoIdpConfig.

How Federated Login Works

  1. User clicks a provider button on the login screen
  2. signInWithRedirect() redirects to Cognito Hosted UI
  3. Cognito redirects to the external IdP (Google, Entra ID, etc.)
  4. After authentication, Cognito creates an idToken with an identities claim
  5. The admin app picks up the session via fetchAuthSession()
  6. The API detects identities in the token, sets external: true
  7. ExternalIdpUserSyncHandler creates/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.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬