[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M79AFZ964CTXR64DSCPQ0YWE":3,"skill-same:01M79AFZ964CTXR64DSCPQ0YWE":50},{"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":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":29,"install":30,"resources":43},"01M79AFZ964CTXR64DSCPQ0YWE","oauth-implementation",null,"OAuth 2.0 and OpenID Connect authentication with secure flows. Use for third-party integrations, SSO systems, token-based API access, or encountering authorization code flow, PKCE, token refresh, scope management errors.","Elogic360\u002Fsoftware-factory","Elogic360","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F156535519?v=4","01M74NH3F0RB13PWB7JZDE2V80","elogic360","01M74NH3FPC65082MDZVMFHDM3",0,"MIT","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fintegrations\u002Fclaude-skills-secondsky\u002Fplugins\u002Foauth-implementation\u002Fskills\u002Foauth-implementation\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: oauth-implementation\ndescription: OAuth 2.0 and OpenID Connect authentication with secure flows. Use for third-party integrations, SSO systems, token-based API access, or encountering authorization code flow, PKCE, token refresh, scope management errors.\nlicense: MIT\n---\n\n# OAuth Implementation\n\nImplement OAuth 2.0 and OpenID Connect for secure authentication.\n\n## OAuth 2.0 Flows\n\n| Flow | Use Case |\n|------|----------|\n| Authorization Code | Web apps (most secure) |\n| Authorization Code + PKCE | SPAs, mobile apps |\n| Client Credentials | Service-to-service |\n| Refresh Token | Session renewal |\n\n## Authorization Code Flow (Express)\n\n```javascript\nconst express = require('express');\nconst jwt = require('jsonwebtoken');\n\n\u002F\u002F Step 1: Redirect to authorization\napp.get('\u002Fauth\u002Flogin', (req, res) => {\n  const state = crypto.randomBytes(16).toString('hex');\n  req.session.oauthState = state;\n\n  const params = new URLSearchParams({\n    client_id: process.env.CLIENT_ID,\n    redirect_uri: process.env.REDIRECT_URI,\n    response_type: 'code',\n    scope: 'openid profile email',\n    state\n  });\n\n  res.redirect(`${PROVIDER_URL}\u002Fauthorize?${params}`);\n});\n\n\u002F\u002F Step 2: Handle callback\napp.get('\u002Fauth\u002Fcallback', async (req, res) => {\n  if (req.query.state !== req.session.oauthState) {\n    return res.status(400).json({ error: 'Invalid state' });\n  }\n\n  const tokenResponse = await fetch(`${PROVIDER_URL}\u002Ftoken`, {\n    method: 'POST',\n    headers: { 'Content-Type': 'application\u002Fx-www-form-urlencoded' },\n    body: new URLSearchParams({\n      grant_type: 'authorization_code',\n      code: req.query.code,\n      redirect_uri: process.env.REDIRECT_URI,\n      client_id: process.env.CLIENT_ID,\n      client_secret: process.env.CLIENT_SECRET\n    })\n  });\n\n  const tokens = await tokenResponse.json();\n  \u002F\u002F Store tokens securely and create session\n});\n```\n\n## PKCE for Public Clients\n\n```javascript\nfunction generatePKCE() {\n  const verifier = crypto.randomBytes(32).toString('base64url');\n  const challenge = crypto\n    .createHash('sha256')\n    .update(verifier)\n    .digest('base64url');\n  return { verifier, challenge };\n}\n```\n\n## Security Requirements\n\n- Always use HTTPS\n- Validate redirect URIs strictly\n- Use PKCE for public clients\n- Store tokens in HttpOnly cookies\n- Implement token rotation\n- Use short-lived access tokens (15 min)\n\n## Additional Implementations\n\nSee [references\u002Fpython-java.md](references\u002Fpython-java.md) for:\n- Python Flask with Authlib OIDC provider\n- OpenID Connect discovery and JWKS endpoints\n- Java Spring Security OAuth2 server\n- Token introspection and revocation\n\n## Never Do\n\n- Store tokens in localStorage\n- Use implicit flow\n- Skip state parameter validation\n- Expose client secrets in frontend\n- Use long-lived access tokens\n","# OAuth Implementation\n\nImplement OAuth 2.0 and OpenID Connect for secure authentication.\n\n## OAuth 2.0 Flows\n\n| Flow | Use Case |\n|------|----------|\n| Authorization Code | Web apps (most secure) |\n| Authorization Code + PKCE | SPAs, mobile apps |\n| Client Credentials | Service-to-service |\n| Refresh Token | Session renewal |\n\n## Authorization Code Flow (Express)\n\n```javascript\nconst express = require('express');\nconst jwt = require('jsonwebtoken');\n\n\u002F\u002F Step 1: Redirect to authorization\napp.get('\u002Fauth\u002Flogin', (req, res) => {\n  const state = crypto.randomBytes(16).toString('hex');\n  req.session.oauthState = state;\n\n  const params = new URLSearchParams({\n    client_id: process.env.CLIENT_ID,\n    redirect_uri: process.env.REDIRECT_URI,\n    response_type: 'code',\n    scope: 'openid profile email',\n    state\n  });\n\n  res.redirect(`${PROVIDER_URL}\u002Fauthorize?${params}`);\n});\n\n\u002F\u002F Step 2: Handle callback\napp.get('\u002Fauth\u002Fcallback', async (req, res) => {\n  if (req.query.state !== req.session.oauthState) {\n    return res.status(400).json({ error: 'Invalid state' });\n  }\n\n  const tokenResponse = await fetch(`${PROVIDER_URL}\u002Ftoken`, {\n    method: 'POST',\n    headers: { 'Content-Type': 'application\u002Fx-www-form-urlencoded' },\n    body: new URLSearchParams({\n      grant_type: 'authorization_code',\n      code: req.query.code,\n      redirect_uri: process.env.REDIRECT_URI,\n      client_id: process.env.CLIENT_ID,\n      client_secret: process.env.CLIENT_SECRET\n    })\n  });\n\n  const tokens = await tokenResponse.json();\n  \u002F\u002F Store tokens securely and create session\n});\n```\n\n## PKCE for Public Clients\n\n```javascript\nfunction generatePKCE() {\n  const verifier = crypto.randomBytes(32).toString('base64url');\n  const challenge = crypto\n    .createHash('sha256')\n    .update(verifier)\n    .digest('base64url');\n  return { verifier, challenge };\n}\n```\n\n## Security Requirements\n\n- Always use HTTPS\n- Validate redirect URIs strictly\n- Use PKCE for public clients\n- Store tokens in HttpOnly cookies\n- Implement token rotation\n- Use short-lived access tokens (15 min)\n\n## Additional Implementations\n\nSee [references\u002Fpython-java.md](references\u002Fpython-java.md) for:\n- Python Flask with Authlib OIDC provider\n- OpenID Connect discovery and JWKS endpoints\n- Java Spring Security OAuth2 server\n- Token introspection and revocation\n\n## Never Do\n\n- Store tokens in localStorage\n- Use implicit flow\n- Skip state parameter validation\n- Expose client secrets in frontend\n- Use long-lived access tokens\n",{"name":5,"license":15,"description":7},"main","c475fc64e94e803b50d14a791dfee8853fbb2c5c","integrations\u002Fclaude-skills-secondsky\u002Fplugins\u002Foauth-implementation\u002Fskills\u002Foauth-implementation","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory","https:\u002F\u002Fgithub.com\u002FElogic360","2026-11-08 22:21:22",{"source":8,"skillName":5,"commands":31,"prompt":41,"zipAvailable":42},[32,35,38],{"tool":33,"command":34},"npx","npx skills add Elogic360\u002Fsoftware-factory --skill oauth-implementation",{"tool":36,"command":37},"bunx","bunx skills add Elogic360\u002Fsoftware-factory --skill oauth-implementation",{"tool":39,"command":40},"pnpm","pnpm dlx skills add Elogic360\u002Fsoftware-factory --skill oauth-implementation","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fintegrations\u002Fclaude-skills-secondsky\u002Fplugins\u002Foauth-implementation\u002Fskills\u002Foauth-implementation\u002FSKILL.md",true,[44],{"path":45,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":48,"sourceHtmlUrl":49},"references\u002Fpython-java.md","REFERENCE","参考文档",6599,"https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fintegrations\u002Fclaude-skills-secondsky\u002Fplugins\u002Foauth-implementation\u002Fskills\u002Foauth-implementation\u002Freferences\u002Fpython-java.md",[51,59,66,73,80,87],{"skillNo":52,"name":53,"nameZh":6,"description":54,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":55,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":58,"publishedAt":19},"01M79G206MT3J6S0GY3C45P2KV","vss-summarize-video","Use to summarize a recorded video via the LVS summarization microservice (HITL-gated) with a VLM fallback. Not for report generation or live RTSP captioning.","Apache-2.0","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fvss-summarize-video\u002FSKILL.md",[],[],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":55,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":19},"01M79G1WN63PGRE8CKD47WEBQ5","vss-setup-video-analytics-api","Use to deploy the vss-video-analytics-api REST service standalone (config-source, data-log bind, Elasticsearch, optional Kafka). Not for full warehouse deploy.","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fvss-setup-video-analytics-api\u002FSKILL.md",[],[],{"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":55,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":19},"01M79G1S9F7VY3EF6H53PRP5AN","vss-setup-behavior-analytics","Use to deploy the vss-behavior-analytics service standalone (entrypoint, config-source, optional calibration). Not for the full warehouse deploy.","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fvss-setup-behavior-analytics\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":55,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":19},"01M79G1N1S1Y27PFZPYMNK1MTQ","vss-search-archive","Use this skill to run top-level VSS fusion search on archived video, or to ingest video files \u002F RTSP streams for search. Do NOT use for ad-hoc visual Q&A (use vss-ask-video), live captioning (use vss-deploy-dense-captioning), or video summarization and reports (use vss-summarize-video).","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fvss-search-archive\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":55,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":19},"01M79G1H6WN0Q6C0VCAXCZX6B7","vss-query-analytics","Use this skill when reading video-analytics metrics, incidents, alerts, and sensor data via the VA-MCP server (port 9901). Not for live VLM or incident-range narrative reports.","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fvss-query-analytics\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":55,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":19},"01M79G1DYPNXQS7QHZ0AAF5FX5","vss-manage-video-io-storage","Use to call the VIOS REST API (sensor list, timelines, clip extraction, snapshots, add\u002Fdelete sensors and streams). Not for VLM inference or search.","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fvss-manage-video-io-storage\u002FSKILL.md",[],[]]