मुख्य सामग्री पर जाएँ
Skillpedia
सिक्योरिटी8.1k · #12594

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 पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/webiny/webiny-js/blob/next/skills/user-skills/cognito-federation/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

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:

  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 प्रोवाइडर।

क्या लॉगिन व्यवहार कस्टमाइज़ हो सकता है?

हाँ, 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

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

prd-to-plan

8.1k

यह आपके एजेंट को प्रोडक्ट आवश्यकताओं के दस्तावेज़ को छोटे, एंड-टू-एंड स्लाइस की चरणबद्ध योजना में बदलने में मदद करती है, जो Markdown फ़ाइल में सहेजी जाती है।

प्रोडक्टिविटीटास्क और प्रोजेक्ट

webiny-admin-architect

8.1k

यह आपके एजेंट को Webiny प्लेटफ़ॉर्म के लिए एडमिन स्क्रीन बनाना सिखाती है, उसकी बिज़नेस लॉजिक परतों और presenter पैटर्न का उपयोग करके।

कोडिंगवेबसाइट और UI (frontend)

webiny-admin-permissions

8.1k

यह आपके एजेंट को Webiny एडमिन स्क्रीन में अनुमति नियंत्रण जोड़ना सिखाती है, जिसमें अपने-आप बनने वाले अनुमति फ़ॉर्म और दिखाने-छिपाने की जाँच शामिल हैं।

कोडिंगवेबसाइट और UI (frontend)

webiny-form-model

8.1k

यह आपके एजेंट को Webiny में declarative field builder, layouts, validation और शर्त वाले नियमों से फ़ॉर्म बनाना सिखाती है।

कोडिंगवेबसाइट और UI (frontend)

मिलती-जुलती skills