[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7B3RR3W1933NP2TAQRKHAF0":3,"skill-same:01M7B3RR3W1933NP2TAQRKHAF0":65},{"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":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":6,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M7B3RR3W1933NP2TAQRKHAF0","oauth-login-debug",null,"Debug live OAuth\u002FOIDC login failures via probes.","merllinsbeard\u002Fmerlin-CTO","merllinsbeard","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F144795773?v=4","01M7B3C01C1PCBWFGB5T7YXSF8","merlin","01M7B3C023BBYDEPAPWBAGW9A7",1,"MIT","https:\u002F\u002Fgithub.com\u002Fmerllinsbeard\u002Fmerlin-CTO\u002Fblob\u002Fmain\u002Fskills\u002Fweb-development\u002Foauth-login-debug\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: oauth-login-debug\ndescription: \"Debug live OAuth\u002FOIDC login failures via probes.\"\n---\n\n# OAuth Login Debug\n\nLive login failures (provider error page, `state` rejected, redirect back to login, origin errors) are protocol-level: fix them with live probes and the actual library source, not by guessing from docs.\n\n## Loop\n\n1. **Reproduce against the live site first.** Capture the exact outgoing authorization request. Headless Playwright with a request listener is the reliable way:\n\n   ```js\n   page.on(\"request\", (r) => { if (r.url().includes(PROVIDER_HOST)) log(r.url()); });\n   \u002F\u002F open login page, click the sign-in button, waitForURL(\u002Fprovider|error\u002F)\n   ```\n\n   Log every query param's **presence and length** (`redirect_uri`, `scope`, `state`, `nonce`, `code_challenge`). The failing param is usually visible by shape, not by name.\n\n2. **Read the bundled library, not the docs.** What the framework actually sends lives in `node_modules` inside the *deployed* image or local checkout. Auth.js example: `@auth\u002Fcore\u002Flib\u002Factions\u002Fsignin\u002Fauthorization-url.js` (what goes into the URL), `...\u002Fcallback\u002Foauth\u002Fchecks.js` (create\u002Fuse\u002Fdecode of state\u002Fpkce\u002Fnonce), `...\u002Fcallback\u002Findex.js` and `oauth\u002Fcallback.js` (callback validation). Grep for the provider config (`checks:`, `issuer`, `authorization`) to find the site's provider file, then trace from there.\n\n3. **Probe the live provider for the real limit.** Providers enforce undocumented constraints. Find them empirically with a curl sweep against the real authorization endpoint, classifying the response body:\n\n   ```bash\n   for len in 64 128 200 255 256 257 300; do\n     body=$(curl -sS \"https:\u002F\u002F\u003Cauth-endpoint>?client_id=$CID&redirect_uri=$URI&response_type=code&scope=openid+profile&state=$(head -c $len \u002Fdev\u002Fzero | tr '\\0' 'a')\")\n     printf '%s %s %s\\n' \"$len\" \"${#body}\" \"$(printf '%s' \"$body\" | head -c 40)\"\n   done\n   ```\n\n   Error bodies are typically a short distinct page; success is the full login UI. A binary sweep pins the exact boundary. Keep `client_id`\u002F`redirect_uri` real so the probe reaches the same validation.\n\n4. **Fix at the root.** If the framework's payload exceeds a provider limit, reconfigure the framework (drop a check, shorten the payload) — never fork the library. Verify the fix keeps equivalent protection: dropping OIDC `state` is compensated by PKCE `code_verifier` (HttpOnly cookie) + `nonce` claim verification, which holds when no redirect-proxy flow is used.\n\n5. **Prove it end-to-end.** Run the repo's own browser e2e with its OIDC fixture if one exists (full login included); otherwise script the same Playwright repro against a staging\u002Flocal stack. Unit tests that pin the provider `checks` array must be updated in the same commit.\n\n## Pitfalls\n\n- **Deployed revision ≠ repo HEAD.** Read the running container's image label\u002Frevision (`docker inspect --format '{{index .Config.Labels \"org.opencontainers.image.revision\"}}'`) and compare with `origin\u002Fmain`. Fixes are not live until the new revision is deployed, and the live bug may already be fixed on main — check branch history before re-fixing.\n- **Auth.js specifics:** with `checks: [..., \"state\", ...]` the `state` parameter is an **encrypted JWE (~430+ chars)**, far longer than a random nonce. Dropping `\"state\"` from `checks` is behaviorally clean: `checks.state.create` returns without emitting the param, `useCookie` short-circuits on the callback, and `oauth4webapi.validateAuthResponse` receives `undefined` and skips state validation. But `create` throws if `origin` data is passed without the check (redirect-proxy flow) — keep that in mind. Also check `AUTH_URL`\u002F`trustHost`: a missing public origin makes Auth.js emit `http:\u002F\u002F` internal redirect URIs and `origin_forbidden` errors, which can stack with the provider error.\n- **Provider docs understate limits.** Telegram documents `state` as a random string with no length cap; the real cap had to be measured. Trust the probe over the docs for boundary values.\n- **Don't conclude from the unit layer alone.** `state` was green in the test suite while production login was broken; only a live repro exposed it.\n\n## References\n\n- `references\u002Ftelegram-oidc-quirks.md` — Telegram OIDC endpoint facts, the measured `state` limit, and the Auth.js JWE-state fix.\n","# OAuth Login Debug\n\nLive login failures (provider error page, `state` rejected, redirect back to login, origin errors) are protocol-level: fix them with live probes and the actual library source, not by guessing from docs.\n\n## Loop\n\n1. **Reproduce against the live site first.** Capture the exact outgoing authorization request. Headless Playwright with a request listener is the reliable way:\n\n   ```js\n   page.on(\"request\", (r) => { if (r.url().includes(PROVIDER_HOST)) log(r.url()); });\n   \u002F\u002F open login page, click the sign-in button, waitForURL(\u002Fprovider|error\u002F)\n   ```\n\n   Log every query param's **presence and length** (`redirect_uri`, `scope`, `state`, `nonce`, `code_challenge`). The failing param is usually visible by shape, not by name.\n\n2. **Read the bundled library, not the docs.** What the framework actually sends lives in `node_modules` inside the *deployed* image or local checkout. Auth.js example: `@auth\u002Fcore\u002Flib\u002Factions\u002Fsignin\u002Fauthorization-url.js` (what goes into the URL), `...\u002Fcallback\u002Foauth\u002Fchecks.js` (create\u002Fuse\u002Fdecode of state\u002Fpkce\u002Fnonce), `...\u002Fcallback\u002Findex.js` and `oauth\u002Fcallback.js` (callback validation). Grep for the provider config (`checks:`, `issuer`, `authorization`) to find the site's provider file, then trace from there.\n\n3. **Probe the live provider for the real limit.** Providers enforce undocumented constraints. Find them empirically with a curl sweep against the real authorization endpoint, classifying the response body:\n\n   ```bash\n   for len in 64 128 200 255 256 257 300; do\n     body=$(curl -sS \"https:\u002F\u002F\u003Cauth-endpoint>?client_id=$CID&redirect_uri=$URI&response_type=code&scope=openid+profile&state=$(head -c $len \u002Fdev\u002Fzero | tr '\\0' 'a')\")\n     printf '%s %s %s\\n' \"$len\" \"${#body}\" \"$(printf '%s' \"$body\" | head -c 40)\"\n   done\n   ```\n\n   Error bodies are typically a short distinct page; success is the full login UI. A binary sweep pins the exact boundary. Keep `client_id`\u002F`redirect_uri` real so the probe reaches the same validation.\n\n4. **Fix at the root.** If the framework's payload exceeds a provider limit, reconfigure the framework (drop a check, shorten the payload) — never fork the library. Verify the fix keeps equivalent protection: dropping OIDC `state` is compensated by PKCE `code_verifier` (HttpOnly cookie) + `nonce` claim verification, which holds when no redirect-proxy flow is used.\n\n5. **Prove it end-to-end.** Run the repo's own browser e2e with its OIDC fixture if one exists (full login included); otherwise script the same Playwright repro against a staging\u002Flocal stack. Unit tests that pin the provider `checks` array must be updated in the same commit.\n\n## Pitfalls\n\n- **Deployed revision ≠ repo HEAD.** Read the running container's image label\u002Frevision (`docker inspect --format '{{index .Config.Labels \"org.opencontainers.image.revision\"}}'`) and compare with `origin\u002Fmain`. Fixes are not live until the new revision is deployed, and the live bug may already be fixed on main — check branch history before re-fixing.\n- **Auth.js specifics:** with `checks: [..., \"state\", ...]` the `state` parameter is an **encrypted JWE (~430+ chars)**, far longer than a random nonce. Dropping `\"state\"` from `checks` is behaviorally clean: `checks.state.create` returns without emitting the param, `useCookie` short-circuits on the callback, and `oauth4webapi.validateAuthResponse` receives `undefined` and skips state validation. But `create` throws if `origin` data is passed without the check (redirect-proxy flow) — keep that in mind. Also check `AUTH_URL`\u002F`trustHost`: a missing public origin makes Auth.js emit `http:\u002F\u002F` internal redirect URIs and `origin_forbidden` errors, which can stack with the provider error.\n- **Provider docs understate limits.** Telegram documents `state` as a random string with no length cap; the real cap had to be measured. Trust the probe over the docs for boundary values.\n- **Don't conclude from the unit layer alone.** `state` was green in the test suite while production login was broken; only a live repro exposed it.\n\n## References\n\n- `references\u002Ftelegram-oidc-quirks.md` — Telegram OIDC endpoint facts, the measured `state` limit, and the Auth.js JWE-state fix.\n",{"name":5,"description":7},"main","116bb09f1369e85cd8a54fec4135e218dca4a061","skills\u002Fweb-development\u002Foauth-login-debug",0,"https:\u002F\u002Fgithub.com\u002Fmerllinsbeard\u002Fmerlin-CTO","https:\u002F\u002Fgithub.com\u002Fmerllinsbeard\u002Fmerlin-CTO\u002Freleases\u002Flatest","https:\u002F\u002Fgithub.com\u002Fmerllinsbeard","ai","2026-08-25 21:36:43",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add merllinsbeard\u002Fmerlin-CTO --skill oauth-login-debug",{"tool":39,"command":40},"bunx","bunx skills add merllinsbeard\u002Fmerlin-CTO --skill oauth-login-debug",{"tool":42,"command":43},"pnpm","pnpm dlx skills add merllinsbeard\u002Fmerlin-CTO --skill oauth-login-debug","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmerllinsbeard\u002Fmerlin-CTO\u002Fblob\u002Fmain\u002Fskills\u002Fweb-development\u002Foauth-login-debug\u002FSKILL.md",true,[47,53,57,61],{"path":48,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":51,"sourceHtmlUrl":52},"references\u002Fprofile-scoped-release-home.md","REFERENCE","参考文档",2109,"https:\u002F\u002Fgithub.com\u002Fmerllinsbeard\u002Fmerlin-CTO\u002Fblob\u002Fmain\u002Fskills\u002Fweb-development\u002Foauth-login-debug\u002Freferences\u002Fprofile-scoped-release-home.md",{"path":54,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":55,"sourceHtmlUrl":56},"references\u002Freverse-proxy-origin-guard.md",2879,"https:\u002F\u002Fgithub.com\u002Fmerllinsbeard\u002Fmerlin-CTO\u002Fblob\u002Fmain\u002Fskills\u002Fweb-development\u002Foauth-login-debug\u002Freferences\u002Freverse-proxy-origin-guard.md",{"path":58,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":59,"sourceHtmlUrl":60},"references\u002Ftelegram-id-claim-normalization.md",2002,"https:\u002F\u002Fgithub.com\u002Fmerllinsbeard\u002Fmerlin-CTO\u002Fblob\u002Fmain\u002Fskills\u002Fweb-development\u002Foauth-login-debug\u002Freferences\u002Ftelegram-id-claim-normalization.md",{"path":62,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":63,"sourceHtmlUrl":64},"references\u002Ftelegram-oidc-quirks.md",3833,"https:\u002F\u002Fgithub.com\u002Fmerllinsbeard\u002Fmerlin-CTO\u002Fblob\u002Fmain\u002Fskills\u002Fweb-development\u002Foauth-login-debug\u002Freferences\u002Ftelegram-oidc-quirks.md",[66,73,80,87,94,101],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":19},"01M7B3SK15WA8JW4G6RBKZR3ME","writing-for-agents","Use for delegate_task, Kanban, and all agent-facing text.","https:\u002F\u002Fgithub.com\u002Fmerllinsbeard\u002Fmerlin-CTO\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-for-agents\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":19},"01M7B3SD78DTTXFVXGDPRK7249","why","Use for 'why does X work this way', 'why we picked Y', design rationale, regressions, postmortems, or data-backed thresholds. Discovers available MCPs and queries each evidence category (source control, issue tracker, long-form docs, real-time chat, infrastructure observability, error tracking, product analytics warehouse) in parallel, then returns a cited read on decisions and tradeoffs. Use how for runtime behavior.","https:\u002F\u002Fgithub.com\u002Fmerllinsbeard\u002Fmerlin-CTO\u002Fblob\u002Fmain\u002Fskills\u002Fwhy\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":19},"01M7B3S8ENS1XQ7YV3N5GV1PCF","vue-best-practices","Use for Vue 3, .vue files, Vue Router, or Pinia. Skip when the repo has no Vue.","https:\u002F\u002Fgithub.com\u002Fmerllinsbeard\u002Fmerlin-CTO\u002Fblob\u002Fmain\u002Fskills\u002Fweb-development\u002Fvue-best-practices\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":19},"01M7B3S2DPXMQN0EFFE8FTF03R","vercel-react-best-practices","React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React\u002FNext.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.","https:\u002F\u002Fgithub.com\u002Fmerllinsbeard\u002Fmerlin-CTO\u002Fblob\u002Fmain\u002Fskills\u002Fweb-development\u002Fvercel-react-best-practices\u002FSKILL.md",[],[],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":19},"01M7B3S06K4AGG5X59TCX900R6","tailwind-v4","Use when writing or reviewing Tailwind CSS v4 classes or migrating v3 syntax.","https:\u002F\u002Fgithub.com\u002Fmerllinsbeard\u002Fmerlin-CTO\u002Fblob\u002Fmain\u002Fskills\u002Fweb-development\u002Ftailwind-v4\u002FSKILL.md",[],[],{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":19},"01M7B3RXNDDCPJ7K5303BXXDTV","react-best-practices","Mastra React subset only. Generic React or Next uses vercel-react-best-practices.","https:\u002F\u002Fgithub.com\u002Fmerllinsbeard\u002Fmerlin-CTO\u002Fblob\u002Fmain\u002Fskills\u002Fweb-development\u002Freact-best-practices\u002FSKILL.md",[],[]]