webiny-cognito-federation
ما الذي تفعله
ترشد هذه المهارة ذكاءك عند إضافة مزودي هوية خارجيين إلى تسجيل Cognito في مشروع Webiny. وهي لمطورين يريدون تسجيل دخول موحّد مع مزودين مثل Google أو Entra ID.
متى تستخدمها
- ✓عندما تريد أن يدخل المستخدمون إلى مشروع Webiny بحساب Google أو Facebook أو Apple أو Amazon.
- ✓عندما تريد أن يتصل Cognito بمزود هوية لشركة باستخدام OIDC.
- ✓عندما تحتاج إلى تخصيص شاشة تسجيل الدخول في الإدارة لمزودين موحّدين.
رابط المهارة
https://github.com/webiny/webiny-js/blob/next/skills/user-skills/cognito-federation/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“اسمح لفريقنا بالدخول إلى إدارة Webiny بحسابات Google عبر Cognito.”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
تشرح المهارة إضافة إعداد federation إلى امتداد 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 ومزودو OIDC مثل Entra ID.
هل يمكن تخصيص سلوك تسجيل الدخول؟
نعم، عبر إعدادات اختيارية للـ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
التعليقات
- …
المزيد من المهارات من هذا المستودع
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 باستخدام منشئ حقول تصريحي، مع التخطيطات والتحقق والقواعد الشرطية.
مهارات مشابهة
reverse-engineer-anything
422kيساعد وكيلك على فحص التطبيقات والحزم المنشورة من الداخل ليشرح الميزات ويقارن الإصدارات ويرشد إلى إعادة البناء، باستخدام أداة REA.
1password
394kيساعد وكيلك على إعداد واجهة سطر أوامر 1Password وتسجيل الدخول، وقراءة الأسرار أو حقنها دون طباعة قيمها في المحادثة.
healthcheck
394kيساعد وكيلك على تدقيق جهاز OpenClaw أو خادمه أمنيًا، مثل SSH والجدار الناري والتحديثات، ويقترح إصلاحات آمنة قابلة للتراجع.