webiny-cognito-federation
यह क्या करती है
यह स्किल आपके AI को Webiny प्रोजेक्ट के Cognito लॉगिन में बाहरी identity प्रोवाइडर जोड़ते समय मार्गदर्शन देती है। यह उन डेवलपर्स के लिए है जिन्हें Google या Entra ID जैसे प्रोवाइडरों के साथ single sign-on चाहिए।
कब इस्तेमाल करें
- ✓जब आप चाहते हों कि उपयोगकर्ता Google, Facebook, Apple या Amazon से Webiny प्रोजेक्ट में साइन इन करें।
- ✓जब आप चाहते हों कि Cognito OIDC के ज़रिए कंपनी के identity प्रोवाइडर से जुड़े।
- ✓जब आपको फ़ेडरेटेड प्रोवाइडरों के लिए एडमिन लॉगिन स्क्रीन कस्टमाइज़ करनी हो।
Skill का लिंक
https://github.com/webiny/webiny-js/blob/next/skills/user-skills/cognito-federation/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“हमारी टीम को Cognito के ज़रिए Google अकाउंट से Webiny एडमिन में साइन इन करने दीजिए।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
स्किल बताती है कि कॉन्फ़िगरेशन फ़ाइल में Cognito एक्सटेंशन में federation सेटिंग कैसे जोड़ें। इससे इंफ़्रास्ट्रक्चर और लॉगिन बटन सेट होते हैं, और फ़ेडरेटेड उपयोगकर्ता अपने-आप 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 प्रोवाइडर।
क्या लॉगिन व्यवहार कस्टमाइज़ हो सकता है?
हाँ, identity mapping और लॉगिन स्क्रीन के लिए वैकल्पिक 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
- लाइसेंस
- —
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
prd-to-plan
8.1kयह आपके एजेंट को प्रोडक्ट आवश्यकताओं के दस्तावेज़ को छोटे, एंड-टू-एंड स्लाइस की चरणबद्ध योजना में बदलने में मदद करती है, जो Markdown फ़ाइल में सहेजी जाती है।
webiny-admin-architect
8.1kयह आपके एजेंट को Webiny प्लेटफ़ॉर्म के लिए एडमिन स्क्रीन बनाना सिखाती है, उसकी बिज़नेस लॉजिक परतों और presenter पैटर्न का उपयोग करके।
webiny-admin-permissions
8.1kयह आपके एजेंट को Webiny एडमिन स्क्रीन में अनुमति नियंत्रण जोड़ना सिखाती है, जिसमें अपने-आप बनने वाले अनुमति फ़ॉर्म और दिखाने-छिपाने की जाँच शामिल हैं।
webiny-form-model
8.1kयह आपके एजेंट को Webiny में declarative field builder, layouts, validation और शर्त वाले नियमों से फ़ॉर्म बनाना सिखाती है।
मिलती-जुलती skills
reverse-engineer-anything
422kयह आपके एजेंट को REA टूल से शिप हुई ऐप्स और पैकेज को अंदर से समझने, वर्ज़न की तुलना करने या दोबारा बनाने में मदद करती है।
1password
394kयह आपके एजेंट को 1Password CLI सेट करने, साइन इन करने और सीक्रेट्स की वैल्यू चैट में छापे बिना उन्हें पढ़ने या इस्तेमाल करने में मदद करती है।
healthcheck
394kयह आपके एजेंट को उस कंप्यूटर या सर्वर का सुरक्षा ऑडिट करने देती है जिस पर OpenClaw चलता है, जिसमें SSH, firewall, अपडेट और बैकअप शामिल हैं, और फिर सुरक्षित सुधार सुझाती है।