[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EV5BAS5NDX55454REE7HAM":3,"skill-same:01M7EV5BAS5NDX55454REE7HAM":47},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":6,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":6,"updatedAt":32,"install":33,"resources":46},"01M7EV5BAS5NDX55454REE7HAM","oauth-oidc-pro",null,"Implement OAuth 2.0 and OpenID Connect securely — flow selection, token hardening, and common vulnerability defenses.","TanNhatCMS\u002Fjarvis","TanNhatCMS","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F113796420?v=4","01M753MV17KG5CD3152G3WQEQY","KietNT","01M7EKEDYVYQ6PWVJJMZ911VMX",0,"MIT","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fams-oauth-oidc-pro\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: oauth-oidc-pro\ndescription: Implement OAuth 2.0 and OpenID Connect securely — flow selection, token hardening, and common vulnerability defenses.\ncategory: security\n---\n\n## Overview\n\nOAuth 2.0 (delegated authorization) and OpenID Connect (identity layer on top) underpin modern SSO, API authorization, and \"login with\" flows. They are also among the most misimplemented protocols in production: the spec's flexibility means small mistakes — a missing state parameter, a confused redirect URI — become account takeovers.\n\nThis skill is the defensive implementation guide: choosing the right flow, hardening tokens and endpoints, and defending against the classic OAuth vulnerability classes. No attack tooling — just how to build it so attacks fail.\n\nOAuth and OIDC are delegation protocols operating in hostile territory — every redirect, token, and browser interaction is attacker-visible. Secure implementation is therefore about distrusting the channel: validate everything, keep secrets server-side, assume tokens leak, and design so that a leaked token buys the attacker as little as possible for as short as possible.\n\n## When to use\n\n- Adding \"login with\" \u002F SSO to an application.\n- Building or reviewing an authorization server or API authorization layer.\n- Integrating third-party OAuth providers securely.\n- Remediating OAuth findings from pentests or audits.\n\n## Core concepts\n\n- **OAuth ≠ authentication:** OAuth authorizes *access to resources*; OpenID Connect adds the ID token for *authentication*. Using plain OAuth for login invites confusion attacks — use OIDC.\n- **Flow selection:** Authorization Code + PKCE is the modern default for all clients (including SPAs and mobile — the old Implicit flow is deprecated). Client Credentials for service-to-service. Device flow for input-constrained devices.\n- **PKCE always:** Proof Key for Code Exchange prevents authorization-code interception. Required for public clients, recommended for all.\n- **Tokens:** short-lived access tokens, sender-constrained where possible (DPoP\u002FmTLS); refresh tokens rotated and bound; ID tokens validated strictly (issuer, audience, expiry, signature, nonce).\n- **Redirect URI discipline:** exact-match allowlist, pre-registered, no wildcards, no open-redirector-adjacent patterns. Most OAuth account-takeovers start here.\n- **Consent hygiene:** minimal scopes by default; clear consent screens; users can review and revoke grants.\n\n- **Sender-constrained tokens.** DPoP or mTLS-bound access tokens mean a stolen token is useless without the private key — the strongest mitigation for token theft.\n- **Pushed authorization requests (PAR).** Moves authorization parameters off the front channel, shrinking the attack surface for request tampering and Mix-Up style confusion.\n- **FAPI profiles for high security.** For financial or healthcare-grade deployments, the FAPI security profile codifies the hardened subset — use it rather than inventing your own.\n\n## Practical workflow\n\n1. **Choose the flow:** Authorization Code + PKCE for user-facing apps; Client Credentials for services; never Implicit or Resource-Owner-Password-Credentials in new designs.\n2. **Harden the client:** pre-register exact redirect URIs; generate cryptographically random `state` and `nonce` per request and validate them; use PKCE (`S256`).\n3. **Harden the server:** validate redirect URIs by exact match; short authorization-code lifetime, single use; authenticate confidential clients properly; rate-limit token endpoints.\n4. **Harden tokens:** short access-token lifetimes; rotate refresh tokens (detect reuse as compromise signal); validate ID tokens fully on every use; scope tokens minimally.\n5. **Review the classic vulnerability classes:** open redirect via redirect_uri, CSRF via missing state, code interception without PKCE, token leakage via referrer\u002Flogs, scope escalation, confused-deputy across providers.\n6. **Operate:** log auth events (with token hashes, never token values); monitor for anomalous grant patterns; provide users a grant-revocation page; rotate client secrets with zero-downtime procedures.\n\n### OAuth security checklist\n\n- [ ] Authorization Code + PKCE; Implicit flow disabled\n- [ ] Exact-match redirect URI allowlist; no wildcards\n- [ ] Random `state` + `nonce`, validated per request\n- [ ] Short-lived codes (single use); short-lived access tokens\n- [ ] Refresh token rotation with reuse detection\n- [ ] Full ID-token validation (iss, aud, exp, signature, nonce)\n- [ ] Minimal scopes; user-facing grant review\u002Frevoke\n- [ ] Token endpoint rate-limited; clients authenticated\n\n### Sustaining the practice\n\n- Audit registered clients and redirect URIs quarterly — stale clients are attack surface\n- Monitor token endpoint abuse patterns (enumeration, stuffing) continuously\n- Review granted scopes per application annually against actual need\n- Track client library versions; upgrade past known-vulnerable releases promptly\n\n### Metrics that prove it works\n\n- % of clients using Authorization Code + PKCE (target: 100% of new)\n- Token lifetime compliance across clients\n- Grant review\u002Frevocation page usage (users actually managing grants)\n- Anomalous grant-pattern alerts investigated\n\n## Common pitfalls\n\n- **Using OAuth as authentication without OIDC.** The classic confusion — always layer OIDC's ID token for login.\n- **Wildcard or loose redirect URIs.** `*.example.com` or path-traversal-tolerant matching enables token theft. Exact match only.\n- **Skipping `state`.** Without it, login CSRF lets attackers bind victims to attacker accounts.\n- **Long-lived tokens in browsers.** Hours-long access tokens in localStorage maximize theft impact. Short lifetimes + rotation.\n- **Logging tokens.** Never log token values; log hashes or key IDs for debugging.\n- **Scope creep.** Requesting `read write admin` \"for later\" violates least privilege and alarms users. Minimal scopes, incremental consent.\n- **Trusting provider SDK defaults blindly.** SDKs optimize for easy integration, not your threat model. Verify redirect handling, state, and token storage in every integration.\n- **Client secrets in mobile apps.** Anything shipped to a device is public. Mobile clients are public clients — use PKCE, never embedded secrets.\n- **Accepting tokens without audience checks.** Resource servers must verify the audience claim — otherwise tokens minted for one API work on another.\n- **Rolling your own provider.** Building an authorization server from scratch is a career-defining risk. Use certified, maintained implementations.\n","## Overview\n\nOAuth 2.0 (delegated authorization) and OpenID Connect (identity layer on top) underpin modern SSO, API authorization, and \"login with\" flows. They are also among the most misimplemented protocols in production: the spec's flexibility means small mistakes — a missing state parameter, a confused redirect URI — become account takeovers.\n\nThis skill is the defensive implementation guide: choosing the right flow, hardening tokens and endpoints, and defending against the classic OAuth vulnerability classes. No attack tooling — just how to build it so attacks fail.\n\nOAuth and OIDC are delegation protocols operating in hostile territory — every redirect, token, and browser interaction is attacker-visible. Secure implementation is therefore about distrusting the channel: validate everything, keep secrets server-side, assume tokens leak, and design so that a leaked token buys the attacker as little as possible for as short as possible.\n\n## When to use\n\n- Adding \"login with\" \u002F SSO to an application.\n- Building or reviewing an authorization server or API authorization layer.\n- Integrating third-party OAuth providers securely.\n- Remediating OAuth findings from pentests or audits.\n\n## Core concepts\n\n- **OAuth ≠ authentication:** OAuth authorizes *access to resources*; OpenID Connect adds the ID token for *authentication*. Using plain OAuth for login invites confusion attacks — use OIDC.\n- **Flow selection:** Authorization Code + PKCE is the modern default for all clients (including SPAs and mobile — the old Implicit flow is deprecated). Client Credentials for service-to-service. Device flow for input-constrained devices.\n- **PKCE always:** Proof Key for Code Exchange prevents authorization-code interception. Required for public clients, recommended for all.\n- **Tokens:** short-lived access tokens, sender-constrained where possible (DPoP\u002FmTLS); refresh tokens rotated and bound; ID tokens validated strictly (issuer, audience, expiry, signature, nonce).\n- **Redirect URI discipline:** exact-match allowlist, pre-registered, no wildcards, no open-redirector-adjacent patterns. Most OAuth account-takeovers start here.\n- **Consent hygiene:** minimal scopes by default; clear consent screens; users can review and revoke grants.\n\n- **Sender-constrained tokens.** DPoP or mTLS-bound access tokens mean a stolen token is useless without the private key — the strongest mitigation for token theft.\n- **Pushed authorization requests (PAR).** Moves authorization parameters off the front channel, shrinking the attack surface for request tampering and Mix-Up style confusion.\n- **FAPI profiles for high security.** For financial or healthcare-grade deployments, the FAPI security profile codifies the hardened subset — use it rather than inventing your own.\n\n## Practical workflow\n\n1. **Choose the flow:** Authorization Code + PKCE for user-facing apps; Client Credentials for services; never Implicit or Resource-Owner-Password-Credentials in new designs.\n2. **Harden the client:** pre-register exact redirect URIs; generate cryptographically random `state` and `nonce` per request and validate them; use PKCE (`S256`).\n3. **Harden the server:** validate redirect URIs by exact match; short authorization-code lifetime, single use; authenticate confidential clients properly; rate-limit token endpoints.\n4. **Harden tokens:** short access-token lifetimes; rotate refresh tokens (detect reuse as compromise signal); validate ID tokens fully on every use; scope tokens minimally.\n5. **Review the classic vulnerability classes:** open redirect via redirect_uri, CSRF via missing state, code interception without PKCE, token leakage via referrer\u002Flogs, scope escalation, confused-deputy across providers.\n6. **Operate:** log auth events (with token hashes, never token values); monitor for anomalous grant patterns; provide users a grant-revocation page; rotate client secrets with zero-downtime procedures.\n\n### OAuth security checklist\n\n- [ ] Authorization Code + PKCE; Implicit flow disabled\n- [ ] Exact-match redirect URI allowlist; no wildcards\n- [ ] Random `state` + `nonce`, validated per request\n- [ ] Short-lived codes (single use); short-lived access tokens\n- [ ] Refresh token rotation with reuse detection\n- [ ] Full ID-token validation (iss, aud, exp, signature, nonce)\n- [ ] Minimal scopes; user-facing grant review\u002Frevoke\n- [ ] Token endpoint rate-limited; clients authenticated\n\n### Sustaining the practice\n\n- Audit registered clients and redirect URIs quarterly — stale clients are attack surface\n- Monitor token endpoint abuse patterns (enumeration, stuffing) continuously\n- Review granted scopes per application annually against actual need\n- Track client library versions; upgrade past known-vulnerable releases promptly\n\n### Metrics that prove it works\n\n- % of clients using Authorization Code + PKCE (target: 100% of new)\n- Token lifetime compliance across clients\n- Grant review\u002Frevocation page usage (users actually managing grants)\n- Anomalous grant-pattern alerts investigated\n\n## Common pitfalls\n\n- **Using OAuth as authentication without OIDC.** The classic confusion — always layer OIDC's ID token for login.\n- **Wildcard or loose redirect URIs.** `*.example.com` or path-traversal-tolerant matching enables token theft. Exact match only.\n- **Skipping `state`.** Without it, login CSRF lets attackers bind victims to attacker accounts.\n- **Long-lived tokens in browsers.** Hours-long access tokens in localStorage maximize theft impact. Short lifetimes + rotation.\n- **Logging tokens.** Never log token values; log hashes or key IDs for debugging.\n- **Scope creep.** Requesting `read write admin` \"for later\" violates least privilege and alarms users. Minimal scopes, incremental consent.\n- **Trusting provider SDK defaults blindly.** SDKs optimize for easy integration, not your threat model. Verify redirect handling, state, and token storage in every integration.\n- **Client secrets in mobile apps.** Anything shipped to a device is public. Mobile clients are public clients — use PKCE, never embedded secrets.\n- **Accepting tokens without audience checks.** Resource servers must verify the audience claim — otherwise tokens minted for one API work on another.\n- **Rolling your own provider.** Building an authorization server from scratch is a career-defining risk. Use certified, maintained implementations.\n",{"name":5,"category":24,"description":7},"security","main","af388a77c2fe5e0b4fd879cca4300a0ffa9a6579","skills\u002Fams-oauth-oidc-pro",1,"https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis","https:\u002F\u002Fgithub.com\u002FTanNhatCMS","https:\u002F\u002Fmrkiet.name.vn","2026-11-07 14:23:08",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add TanNhatCMS\u002Fjarvis --skill oauth-oidc-pro",{"tool":39,"command":40},"bunx","bunx skills add TanNhatCMS\u002Fjarvis --skill oauth-oidc-pro",{"tool":42,"command":43},"pnpm","pnpm dlx skills add TanNhatCMS\u002Fjarvis --skill oauth-oidc-pro","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fams-oauth-oidc-pro\u002FSKILL.md",true,[],[48,55,63,70,77,84],{"skillNo":49,"name":50,"nameZh":6,"description":51,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":19},"01M7EWYJR0J8DARY7E59Z6Y9MV","web-scrape","Turn web pages into LLM-ready markdown via the Firecrawl API (renders JS, anti-bot handling). Use when browser_open\u002Ffetch fails on JS-heavy pages, or when you need clean markdown\u002Fstructured extraction from a site. Requires FIRECRAWL_API_KEY.","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fweb-scrape\u002FSKILL.md",[],[],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":59,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M7EWYBN5P6F2AJG3FR24T9BP","design-taste-frontend","tasteskill v2, the anti-slop frontend skill. Art direction for websites, distilled from a study of 247 curated gallery sites (One Page Love, Awwwards Sites of the Day). Deals researched directions (idea, composition, type, palette, photographs, section blueprints) from a library, enforces a strict no-slop house style with a real-browser inspector, and runs a look-and-fix loop on screenshots. Use this whenever you build, design, redesign, restyle, polish or review a landing page, marketing site, portfolio, product page, one-pager, hero or any public-facing web page, in any stack (HTML\u002FCSS, React, Next.js, Vue, Svelte, Astro, Tailwind) — also when the user says a page looks generic, templated, \"AI-made\", sloppy, or asks to make it look designed, premium, award-level or less like every other site. Not for dashboards or app screens.","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Ftaste-design\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Ftaste-design\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M7EWY8FQFNQ2GB7NZZWGSSDX","test-driven-development","Use when implementing any feature or bugfix, before writing implementation code","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-tdd\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M7EWY5SHBFRH1HDHVWM9K7TV","systematic-debugging","Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-debugging\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M7EWY3NM0Z0JAKS7HDZ24K66","requesting-code-review","Use when completing tasks, implementing major features, or before merging to verify work meets requirements","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-code-review\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M7EWY0WRMWX4M9ZFY0WKC593","brainstorming","You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-brainstorming\u002FSKILL.md",[],[]]