oauth-expert
यह क्या करती है
यह स्किल login और एक्सेस नियंत्रण के लिए OAuth 2.0 और OpenID Connect लागू करने का मार्गदर्शन देती है, जिसमें authorization flows, PKCE, token जाँच और भंडारण शामिल हैं। यह ऐप्स में sign-in या API एक्सेस जोड़ने वाले डेवलपरों के लिए है।
कब इस्तेमाल करें
- ✓जब आप web, mobile या single-page ऐप में किसी identity provider से login जोड़ रहे हों।
- ✓जब ऐप को उपयोगकर्ता की ओर से tokens के साथ किसी API को कॉल करना हो।
- ✓जब JWT tokens पर भरोसा करने से पहले उनकी वैधता जाँचनी हो।
Skill का लिंक
https://github.com/RightNow-AI/openfang/blob/main/crates/openfang-skills/bundled/oauth-expert/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरे single-page ऐप में PKCE के साथ OAuth से सुरक्षित sign-in जोड़िए, और समझाइए कि tokens सुरक्षित रूप से कैसे सहेजें।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
स्किल public ऐप्स के लिए PKCE के साथ authorization code flow, सावधान token जाँच और सुरक्षित भंडारण, और एक्सेस के लिए बारीक scopes की सलाह देती है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
OAuth and OpenID Connect Expert
An identity and access management specialist with deep expertise in OAuth 2.0, OpenID Connect, and token-based authentication architectures. This skill provides guidance for implementing secure authorization flows, token lifecycle management, and identity federation patterns across web applications, mobile apps, SPAs, and machine-to-machine services.
Key Principles
- Always use the Authorization Code flow with PKCE for public clients (SPAs, mobile apps, CLI tools); the implicit flow is deprecated and insecure
- Validate every JWT thoroughly: check the signature algorithm, issuer (iss), audience (aud), expiration (exp), and not-before (nbf) claims before trusting its contents
- Design scopes to represent specific permissions (read:documents, write:orders) rather than broad roles; fine-grained scopes enable least-privilege access
- Store tokens securely: HTTP-only secure cookies for web apps, secure storage APIs for mobile, and encrypted credential stores for server-side services
- Treat refresh tokens as highly sensitive credentials; bind them to the client, rotate on use, and set reasonable absolute expiration times
Techniques
- Implement Authorization Code + PKCE: generate a random code_verifier, derive code_challenge via S256, send the challenge in the authorize request, and send the verifier in the token exchange
- Use Client Credentials flow for server-to-server authentication where no user context is needed; scope the resulting token narrowly
- Configure token refresh with sliding window expiration: issue short-lived access tokens (5-15 minutes) with longer refresh tokens (hours to days), rotating the refresh token on each use
- Implement OIDC by requesting the openid scope; validate the id_token signature and claims, then use the userinfo endpoint for additional profile data
- Set up the Backend-for-Frontend (BFF) pattern for SPAs: the BFF server handles the OAuth flow and stores tokens in HTTP-only cookies, keeping tokens out of JavaScript entirely
- Implement token revocation by calling the revocation endpoint on logout and maintaining a server-side deny list for JWTs that must be invalidated before expiration
Common Patterns
- Multi-tenant Identity: Use the issuer and tenant claims to route token validation to the correct identity provider, supporting customers who bring their own IdP
- Step-up Authentication: Request additional authentication factors (MFA) when accessing sensitive operations by checking the acr claim and initiating a new auth flow if insufficient
- Token Exchange: Use the OAuth 2.0 Token Exchange (RFC 8693) for service-to-service delegation, allowing a backend to obtain a narrowly-scoped token on behalf of the original user
- Device Authorization Flow: For input-constrained devices (TVs, CLI tools), use the device code grant where the user authorizes on a separate device with a browser
Pitfalls to Avoid
- Do not store access tokens or refresh tokens in localStorage; they are vulnerable to XSS attacks and accessible to any JavaScript on the page
- Do not skip the state parameter in authorization requests; it prevents CSRF attacks by binding the request to the user session
- Do not accept tokens without validating the audience claim; a token issued for one API should not be accepted by a different API
- Do not implement custom cryptographic token formats; use well-tested JWT libraries and standard OAuth/OIDC specifications
अक्सर पूछे जाने वाले सवाल
PKCE क्या है?
यह sign-in कोड के आदान-प्रदान की सुरक्षा का एक अतिरिक्त चरण है, जिसे स्किल single-page ऐप्स जैसे public ऐप्स के लिए ज़रूरी मानती है।
JWT validation में क्या जाँचा जाता है?
स्किल कहती है कि token पर भरोसा करने से पहले signature algorithm, issuer, audience, expiry और not-before समय जाँचें।
क्या implicit flow अब भी सुझाया जाता है?
नहीं। स्किल कहती है कि implicit flow पुराना और असुरक्षित है।
जानकारी
लेखक का मूल विवरण
OAuth 2.0 and OpenID Connect expert for authorization flows, PKCE, and token management
repo: RightNow-AI/openfang
लोकप्रियता
- GitHub स्टार
- 18k
- रैंकिंग में स्थान
- #10695
- लाइसेंस
- Apache-2.0
- अपडेट की गई
- 2/7/2026
कमेंट
- …
इस repository की और skills
browser-automation
18kयह आपके एजेंट को Playwright से वेब ब्राउज़र नियंत्रित करना सिखाती है, बटन, फ़ॉर्म और लिंक खोजने के लिए CSS selectors का उपयोग करते हुए।
clip-hand-skill
18kयह आपके एजेंट को वीडियो क्लिप बनाने में मदद करती है: वीडियो डाउनलोड करना, उसकी बोली ट्रांसक्राइब करना, subtitle फ़ाइलें बनाना और ffmpeg से क्लिप काटना।
collector-hand-skill
18kयह आपके एजेंट को किसी विषय या कंपनी पर सार्वजनिक जानकारी जुटाने, मुख्य entities निकालने, बदलाव ट्रैक करने और भावना का अंदाज़ा लगाने में मदद करती है।
infisical-sync-skill
18kयह आपके एजेंट को API के ज़रिए Infisical vault में secrets पढ़ने और अपडेट करने में मदद करती है, login के चरणों और साफ़ error संभालने के साथ।
मिलती-जुलती skills
reverse-engineer-anything
422kयह आपके एजेंट को REA टूल से शिप हुई ऐप्स और पैकेज को अंदर से समझने, वर्ज़न की तुलना करने या दोबारा बनाने में मदद करती है।
1password
394kयह आपके एजेंट को 1Password CLI सेट करने, साइन इन करने और सीक्रेट्स की वैल्यू चैट में छापे बिना उन्हें पढ़ने या इस्तेमाल करने में मदद करती है।
healthcheck
394kयह आपके एजेंट को उस कंप्यूटर या सर्वर का सुरक्षा ऑडिट करने देती है जिस पर OpenClaw चलता है, जिसमें SSH, firewall, अपडेट और बैकअप शामिल हैं, और फिर सुरक्षित सुधार सुझाती है।