convex-setup-auth
ما الذي تفعله
تضيف هذه المهارة المصادقة إلى تطبيق Convex. تساعدك على اختيار مزوّد تسجيل الدخول، وربطه بالمستخدمين، وقصر بعض الميزات على من سجّلوا دخولهم.
متى تستخدمها
- ✓عندما تضيف تسجيل دخول إلى تطبيق Convex لأول مرة.
- ✓عندما تحتاج إلى جدول مستخدمين يربط كل شخص بهوية دخوله.
- ✓عندما تريد قصر بعض الدوال أو الصفحات على المستخدمين المسجلين أو على أدوار معينة.
رابط المهارة
https://github.com/openclaw/clawhub/blob/main/.agents/skills/convex-setup-auth/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“اضبط تسجيل الدخول لتطبيق Convex الخاص بي، وتأكد من أن المسجلين وحدهم يرون عناصرهم.”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
يسأل الوكيل أولًا عن مزوّد الدخول الذي تريده، ما لم يكن مشروعك يستخدم واحدًا بالفعل. ثم يضبط المزوّد وجدول المستخدمين والدوال المساعدة التي تتحقق من هوية المسجّل.
المحتوى التقني (ملف SKILL.md الأصلي)
النص الأصلي من المؤلف، مباشرة من GitHub.
Convex Authentication Setup
Implement secure authentication in Convex with user management and access control.
When to Use
- Setting up authentication for the first time
- Implementing user management (users table, identity mapping)
- Creating authentication helper functions
- Setting up auth providers (Convex Auth, Clerk, WorkOS AuthKit, Auth0, custom JWT)
When Not to Use
- Auth for a non-Convex backend
- Pure OAuth/OIDC documentation without a Convex implementation
- Debugging unrelated bugs that happen to surface near auth code
- The auth provider is already fully configured and the user only needs a one-line fix
First Step: Choose the Auth Provider
Convex supports multiple authentication approaches. Do not assume a provider.
Before writing setup code:
- Ask the user which auth solution they want, unless the repository already makes it obvious
- If the repo already uses a provider, continue with that provider unless the user wants to switch
- If the user has not chosen a provider and the repo does not make it obvious, ask before proceeding
Common options:
- Convex Auth - good default when the user wants auth handled directly in Convex
- Clerk - use when the app already uses Clerk or the user wants Clerk's hosted auth features
- WorkOS AuthKit - use when the app already uses WorkOS or the user wants AuthKit specifically
- Auth0 - use when the app already uses Auth0
- Custom JWT provider - use when integrating an existing auth system not covered above
Look for signals in the repo before asking:
- Dependencies such as
@clerk/*,@workos-inc/*,@auth0/*, or Convex Auth packages - Existing files such as
convex/auth.config.ts, auth middleware, provider wrappers, or login components - Environment variables that clearly point at a provider
After Choosing a Provider
Read the provider's official guide and the matching local reference file:
- Convex Auth: official docs, then
references/convex-auth.md - Clerk: official docs, then
references/clerk.md - WorkOS AuthKit: official docs, then
references/workos-authkit.md - Auth0: official docs, then
references/auth0.md
The local reference files contain the concrete workflow, expected files and env vars, gotchas, and validation checks.
Use those sources for:
- package installation
- client provider wiring
- environment variables
convex/auth.config.tssetup- login and logout UI patterns
- framework-specific setup for React, Vite, or Next.js
For shared auth behavior, use the official Convex docs as the source of truth:
- Auth in Functions for
ctx.auth.getUserIdentity() - Storing Users in the Convex Database for optional app-level user storage
- Authentication for general auth and authorization guidance
- Convex Auth Authorization when the provider is Convex Auth
Prefer official docs over recalled steps, because provider CLIs and Convex Auth
internals change between versions. Inventing setup from memory risks outdated
patterns. For third-party providers, only add app-level user storage if the app
actually needs user documents in Convex. Not every app needs a users table.
For Convex Auth, follow the Convex Auth docs and built-in auth tables rather
than adding a parallel users table plus storeUser flow, because Convex Auth
already manages user records internally. After running provider initialization
commands, verify generated files and complete the post-init wiring steps the
provider reference calls out. Initialization commands rarely finish the entire
integration.
Core Pattern: Protecting Backend Functions
The most common auth task is checking identity in Convex functions.
// Bad: trusting a client-provided userId
export const getMyProfile = query({
args: { userId: v.id("users") },
handler: async (ctx, args) => {
return await ctx.db.get(args.userId);
},
});
// Good: verifying identity server-side
export const getMyProfile = query({
args: {},
handler: async (ctx) =>
الأسئلة الشائعة
ما مزوّدو الدخول الذين يستطيع إعدادهم؟
Convex Auth وClerk وWorkOS AuthKit وAuth0 أو إعداد JWT مخصص، حسب اختيارك.
هل سيختار المزوّد بدلًا مني؟
فقط إذا كان مشروعك يستخدم واحدًا بالفعل. وإلا يسألك الوكيل أولًا.
هل تصلح لخلفيات أخرى غير Convex؟
لا. هي مخصصة لتطبيقات Convex فقط.
التفاصيل
الوصف الأصلي من المؤلف
Sets up Convex auth, identity mapping, and access control. Use for login, auth providers, users tables, protected functions, or roles in a Convex app.
repo: openclaw/clawhub
الشعبية
- نجوم GitHub
- 9.5k
- الترتيب
- #12258
- الترخيص
- MIT
- آخر تحديث
- 2/11/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
axiom-alerting
9.5kيساعد وكيلك على إنشاء مراقبات Axiom ومسارات الإشعارات وإدارتها عبر Axiom API، والتحقق من أن التنبيهات تعمل كما هو متوقع.
axiom-sre
9.5kيساعد وكيلك على التحقيق في الحوادث والأخطاء الإنتاجية خطوة بخطوة، فيختبر كل تخمين مقابل سجلات Axiom قبل استخلاص أي نتيجة.
building-dashboards
9.5kيساعد وكيلك على تصميم لوحات Axiom بالمخططات والاستعلامات والفلاتر المناسبة، بدءًا من القرارات التي يجب أن تدعمها اللوحة.
controlling-costs
9.5kيساعد وكيلك على العثور على بيانات غير مستخدمة في Axiom، وبناء لوحات ومراقبات تتابع تكاليف الاستيعاب وتخفضها.
مهارات مشابهة
api-connector-builder
280kيبني وكيلك اتصالات API جديدة على النمط الموجود، ويفيد عندما تحتاج إلى تكامل إضافي دون ابتكار طريقة جديدة للعمل.
api-design
280kيساعد وكيلك على تصميم واجهات REST API وفق أفضل الممارسات، ويوضح كيف تتواصل وكيف تُعرض الأخطاء وكيف تُنظَّم البيانات.
backend-patterns
280kيساعد وكيلك على أنماط بنية الخادم وتحسين قاعدة البيانات، ويفيد في بناء الشيفرة التي تعمل على الخادم أو مراجعتها.