[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6998S2EZKD3GEJ7F943RZTE":3,"skill-same:01M6998S2EZKD3GEJ7F943RZTE":161},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":54,"linkOnly":55,"markdownContent":56,"markdownBody":57,"frontMatter":58,"refName":62,"commitSha":63,"skillDirectory":64,"forksCount":65,"repositoryHtmlUrl":66,"repositoryHomepageUrl":17,"ownerHtmlUrl":67,"ownerBlogUrl":68,"ownerDescription":69,"updatedAt":70,"install":71,"resources":84},"01M6998S2EZKD3GEJ7F943RZTE","sign-in-with-google-web","Google 网页登录集成","Implement, configure, and secure Sign In With Google (SiwG) using Google Identity Services (GIS \u002F `https:\u002F\u002Faccounts.google.com\u002Fgsi\u002Fclient`) across web architectures. Use when creating Google sign-in buttons, implementing Google One Tap with FedCM, integrating GIS in React\u002FNext.js\u002FAngular\u002FHTML, verifying ID tokens on backend runtimes (Python\u002FNode.js\u002FGo\u002FJava), enforcing Google Workspace domain restrictions (`hd`), securing client-side ID tokens via WebCrypto nonces or encrypted IndexedDB, embedding in cross-origin iframes via the Intermediate Iframe API (`https:\u002F\u002Faccounts.google.com\u002Fgsi\u002Fintermediate`), configuring Content Security Policy (CSP), COOP, and Permissions Policy (`identity-credentials-get`) headers, or handling sign-out and revocation. Don't use for legacy Google Sign-In (`gapi.auth2`), Google Cloud IAM service accounts, or Android\u002FiOS native Credential Manager.","使用 Google Identity Services（GIS，`https:\u002F\u002Faccounts.google.com\u002Fgsi\u002Fclient`）在各种 Web 架构中实现、配置并保护 Google 登录（Sign In With Google，SiwG）。适用于创建 Google 登录按钮、通过 FedCM 实现 Google One Tap、在 React\u002FNext.js\u002FAngular\u002FHTML 中集成 GIS、在后端运行时（Python\u002FNode.js\u002FGo\u002FJava）验证 ID token、强制实施 Google Workspace 域名限制（`hd`）、通过 WebCrypto nonce 或加密的 IndexedDB 保护客户端 ID token、通过 Intermediate Iframe API（`https:\u002F\u002Faccounts.google.com\u002Fgsi\u002Fintermediate`）嵌入跨域 iframe、配置内容安全策略（CSP）、COOP 和 Permissions Policy（`identity-credentials-get`）响应头，或处理退出登录与授权撤销。不适用于旧版 Google Sign-In（`gapi.auth2`）、Google Cloud IAM 服务账号，或 Android\u002FiOS 原生 Credential Manager。","google\u002Fskills","google","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1342004?v=4","01M698VYEFDM0VJBZDYYJ2T83S","Google","01M698WR0H76ENHE587T9EJT89",24235,"Apache-2.0",null,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fidentity\u002Fsign-in-with-google-web\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQ6TQZN6R52WBJ9H8NRMQM","软件开发工程师","PROFESSION","适用职业",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BTFDX7M21YT75733H52N36","身份与访问管理","SCENARIO","使用场景",[31,32,33,34,10,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53],"with","sign","sign in with google web","web","identity","buttons","implementing","manager","runtimes","architectures","domain","iam","permissions","secure","react","implement","policy","google workspace","security","google cloud","android","python","go","2026-11-10 10:12:30",false,"---\nname: sign-in-with-google-web\nmetadata:\n  category: Identity\n  version: \"1.0.0\"\ndescription: >-\n  Implement, configure, and secure Sign In With Google (SiwG) using Google Identity\n  Services (GIS \u002F `https:\u002F\u002Faccounts.google.com\u002Fgsi\u002Fclient`) across web architectures.\n  Use when creating Google sign-in buttons, implementing Google One Tap with FedCM,\n  integrating GIS in React\u002FNext.js\u002FAngular\u002FHTML, verifying ID tokens on backend\n  runtimes (Python\u002FNode.js\u002FGo\u002FJava), enforcing Google Workspace domain restrictions\n  (`hd`), securing client-side ID tokens via WebCrypto nonces or encrypted IndexedDB,\n  embedding in cross-origin iframes via the Intermediate Iframe API\n  (`https:\u002F\u002Faccounts.google.com\u002Fgsi\u002Fintermediate`), configuring Content Security\n  Policy (CSP), COOP, and Permissions Policy (`identity-credentials-get`) headers,\n  or handling sign-out and revocation. Don't use for legacy Google Sign-In (`gapi.auth2`),\n  Google Cloud IAM service accounts, or Android\u002FiOS native Credential Manager.\n---\n\n# Sign In With Google (SiwG) Integration & Security Architecture\n\nThis skill provides normative architectural guidelines, secure implementation\ncontracts, and failure-prevention protocols for integrating Sign In With Google\nvia the Google Identity Services (GIS) Web SDK\n(`https:\u002F\u002Faccounts.google.com\u002Fgsi\u002Fclient`).\n\n## 1. IETF Architecture Taxonomy & Hierarchy (RECOMMEND BFF \u002F TMB FIRST)\n\nAll Sign In With Google implementations MUST align with the\n[IETF OAuth 2.0 for Browser-Based Applications (`draft-ietf-oauth-browser-based-apps`)](https:\u002F\u002Fdatatracker.ietf.org\u002Fdoc\u002Fhtml\u002Fdraft-ietf-oauth-browser-based-apps#name-application-architecture-pa)\ntaxonomy.\n\n> [!IMPORTANT] **Primary Recommendation:** Always recommend backend-mediated\n> patterns (**Pattern A: Backend For Frontend** or **Pattern B: Token-Mediating\n> Backend \u002F Redirect Mode**) as the most secure, robust, and industry-standard\n> architectures whenever an application has a backend server. Fall back to\n> client-only browser patterns (Patterns C & D) only when constrained by\n> serverless static hosting or offline-first PWA requirements.\n\n\u003C!-- mdformat off(reason: preserve ASCII architecture diagram width) -->\n```\n┌─────────────────────────────────────────────────────────────────────────────────────────┐\n│                          IETF ARCHITECTURE HIERARCHY & SELECTION                        │\n├──────────────────────────┬──────────────────────────┬───────────────────────────────────┤\n│ Pattern A (RECOMMENDED): │ Pattern B (RECOMMENDED): │ Patterns C & D (Fallbacks):       │\n│ Backend For Frontend     │ Token-Mediating Backend  │ Browser-Based OAuth Client        │\n│ (BFF - IETF § 6.1)       │ (TMB \u002F Redirect § 6.2)   │ (JavaScript-Only - IETF § 6.3)    │\n├──────────────────────────┼──────────────────────────┼───────────────────────────────────┤\n│ ? GOLD STANDARD         │ ? NATIVE FORM REDIRECT  │ ⚡ STATIC SPA \u002F ? OFFLINE PWA    │\n│ • Full-stack SPA + API   │ • Server-rendered & apps │ • Pure client-side or offline PWAs│\n│ • Client JS fetch to API │ • GIS HTTP POST login_uri│ • C: Ephemeral in-memory closure  │\n│ • HttpOnly session cookie│ • Direct server redirect │ • D: WebCrypto Encrypted IndexedDB│\n│ • Tokens never in browser│ • Tokens never in JS     │ • Strict WebCrypto nonces \u002F keys  │\n└──────────────────────────┴──────────────────────────┴───────────────────────────────────┘\n```\n\u003C!-- mdformat on -->\n\n### ? Pattern A: Backend For Frontend (BFF - IETF § 6.1) — STRONGLY RECOMMENDED\n\n*   **Why it is the Gold Standard**: ID tokens (JWTs) and access tokens are\n    never exposed to browser JavaScript across page reloads. This provides\n    complete architectural immunity against XSS token harvesting.\n\n*   **Architecture**: The browser frontend loads the GIS SDK, captures the\n    credential in JavaScript callback (`callback: handleCredentialResponse`),\n    and immediately forwards the ID token (JWT) via `fetch('\u002Fapi\u002Fauth\u002Fgoogle', {\n    method: 'POST' })` to the backend.\n\n*   **Backend Responsibilities**: The backend validates the JWT cryptographic\n    signature against Google's public JWKs\n    (`google.oauth2.id_token.verify_oauth2_token`), checks the `aud`, `hd`, and\n    `nonce` claims against server session state, creates a server session, and\n    issues a first-party `HttpOnly; Secure; SameSite=Lax` session cookie.\n\n*   See full implementation in\n    [references\u002Fbff_fastapi_verification.md](references\u002Fbff_fastapi_verification.md).\n\n### ? Pattern B: Token-Mediating Backend via `login_uri` Redirect (IETF § 6.2) — Server-Rendered & Form POST\n\n*   **Why it is Highly Secure**: Bypasses client-side JavaScript credential\n    handling entirely by instructing GIS to perform an HTTP POST directly to the\n    backend's `login_uri`.\n\n*   **Architecture**: Configured via `google.accounts.id.initialize({ client_id,\n    login_uri: \"https:\u002F\u002Fexample.com\u002Fapi\u002Fauth\u002Fcallback\", ux_mode: \"redirect\" })`\n    or HTML attributes (`data-login_uri=\"https:\u002F\u002Fexample.com\u002Fapi\u002Fauth\u002Fcallback\"`\n    and `data-ux_mode=\"redirect\"`).\n\n*   **Backend Responsibilities**: The backend receives the ID token as a form\n    POST body (`credential` parameter), validates the double-submit\n    `g_csrf_token` cookie against the `g_csrf_token` POST body field,\n    cryptographically verifies the ID token server-side, establishes a session\n    cookie, and returns a standard HTTP 302\u002F303 redirect.\n\n*   See full implementation in\n    [references\u002Ftmb_login_uri_redirect.md](references\u002Ftmb_login_uri_redirect.md).\n\n### Pattern C: Browser-Based OAuth Client — Ephemeral In-Memory (IETF § 6.3) — Fallback for Static SPAs\n\n*   **Scope**: Use ONLY when deployment is strictly serverless\u002Fstatic (e.g.,\n    GitHub Pages, Firebase static hosting) with no backend component.\n\n*   **Storage Invariant**: The ID token is held strictly in private JavaScript\n    memory\u002Fclosures during the active tab session. **Never store raw tokens in\n    `localStorage` or `sessionStorage`**.\n\n*   **Session Renewal**: Uses GIS One Tap \u002F FedCM auto-select (`auto_select:\n    true`) to transparently re-acquire fresh ID tokens into memory on page\n    reload without persistent browser storage.\n\n*   **XSS & Replay Protection**: Generate a cryptographic `nonce` via\n    `window.crypto.getRandomValues()` and pass it directly to\n    `google.accounts.id.initialize({ client_id, nonce: clientNonce })`. Validate\n    that `payload.nonce === clientNonce` before trusting claims in memory.\n\n*   See full implementation in\n    [references\u002Fin_memory_spa_nonce.md](references\u002Fin_memory_spa_nonce.md).\n\n### Pattern D: Browser-Based OAuth Client — WebCrypto Encrypted IndexedDB (IETF § 6.3) — Fallback for Offline PWAs\n\n*   **Scope**: Use ONLY for offline-first Progressive Web Apps (PWAs) where user\n    authentication proof must survive tab refreshes when disconnected from the\n    network.\n\n*   **Storage Invariant**: **NEVER store raw plaintext ID tokens in\n    `localStorage`**. Encrypt the ID token payload using WebCrypto `AES-GCM`\n    with a non-extractable session key (`extractable: false`) before writing\n    ciphertext and IV to `IndexedDB`.\n\n*   See full implementation in\n    [references\u002Foffline_pwa_encryption.md](references\u002Foffline_pwa_encryption.md).\n\n--------------------------------------------------------------------------------\n\n## 2. Mandatory Security Directives & Browser Policies\n\nTo avoid multi-turn repair loops and browser security exceptions, provide all\nrequired CSP, COOP, and user activation directives in the initial deliverable:\n\n### A. Content Security Policy (CSP) Directives\n\n```http\nContent-Security-Policy:\n  script-src 'self' https:\u002F\u002Faccounts.google.com\u002Fgsi\u002Fclient;\n  frame-src https:\u002F\u002Faccounts.google.com\u002Fgsi\u002F;\n  connect-src https:\u002F\u002Faccounts.google.com\u002Fgsi\u002F;\n```\n\nIf using strict nonce-based CSP, attach the nonce to the GIS script tag:\n`\u003Cscript src=\"https:\u002F\u002Faccounts.google.com\u002Fgsi\u002Fclient\" async defer\nnonce=\"{{NONCE}}\">\u003C\u002Fscript>`.\n\n### B. Cross-Origin Opener Policy (COOP)\n\nTo allow GIS popup dialogs to communicate credentials back to the parent window\nvia `postMessage`:\n\n```http\nCross-Origin-Opener-Policy: same-origin-allow-popups\n```\n\n*(Serving `same-origin` without `allow-popups` breaks GIS popups and results in\nsilent failures).*\n\n### C. Automatic Selection, FedCM, & Sign-Out Lifecycle (`disableAutoSelect`)\n\nWhen enabling automatic zero-click return sign-in with Google One Tap (FedCM is\nenabled by default in GIS):\n\n*   Set `auto_select: true` in `google.accounts.id.initialize({...})` (do not\n    pass the deprecated `use_fedcm_for_prompt` parameter).\n\n*   **Deprecated Library Warning**: NEVER mix deprecated `gapi.auth2`\n    (`gapi.auth2.init`, `gapi.auth2.getAuthInstance().signOut()`) with Google\n    Identity Services (GIS). `gapi.auth2` is completely retired; use GIS methods\n    exclusively.\n\n*   **Sign-Out Protocol**: When the user explicitly logs out of your\n    application, you **MUST** call `google.accounts.id.disableAutoSelect()`:\n\n    ```javascript\n    function handleUserLogout() {\n      \u002F\u002F 1. Disable automatic One Tap \u002F FedCM re-authentication\n      google.accounts.id.disableAutoSelect();\n\n      \u002F\u002F 2. Clear application session state \u002F server cookie\n      fetch('\u002Fapi\u002Fauth\u002Flogout', { method: 'POST' }).then(() => {\n        window.location.href = '\u002Flogin';\n      });\n    }\n    ```\n\n*   *(Failing to call `disableAutoSelect()` causes an immediate automatic\n    re-login loop on the next page visit after intentional user logout).*\n\n### D. Reliable Dynamic Script Loading & Framework Lifecycle (React, Next.js, SPAs)\n\nWhen mounting Sign In With Google in Single Page Applications (React, Next.js,\nVue, Angular):\n\n*   Modern SPAs execute component lifecycles asynchronously. Attempting to\n    access `window.google.accounts.id` before `\u003Cscript\n    src=\"https:\u002F\u002Faccounts.google.com\u002Fgsi\u002Fclient\">` has finished loading causes\n    `ReferenceError: google is not defined`.\n\n*   **NEVER use `gapi` or polling (`setInterval`)**: Use deterministic dynamic\n    script loading with `onload` \u002F `addEventListener('load')` event listeners.\n\n*   **Dynamic Script Loader Pattern**:\n\n    ```tsx\n    import React, { useEffect, useState } from 'react';\n\n    export function useGoogleIdentityScript() {\n      const [isLoaded, setIsLoaded] = useState(false);\n\n      useEffect(() => {\n        if (window.google?.accounts?.id) {\n          setIsLoaded(true);\n          return;\n        }\n\n        const existingScript = document.querySelector(\n          'script[src=\"https:\u002F\u002Faccounts.google.com\u002Fgsi\u002Fclient\"]'\n        );\n        if (existingScript) {\n          existingScript.addEventListener('load', () => setIsLoaded(true));\n          return;\n        }\n\n        const script = document.createElement('script');\n        script.src = 'https:\u002F\u002Faccounts.google.com\u002Fgsi\u002Fclient';\n        script.async = true;\n        script.defer = true;\n        script.onload = () => setIsLoaded(true);\n        document.head.appendChild(script);\n      }, []);\n\n      return isLoaded;\n    }\n    ```\n\n*   *(Always use deterministic `onload` event listeners or framework `\u003CScript\n    strategy=\"afterInteractive\">` rather than brittle `setInterval` polling).*\n\n### E. Embedded Iframes & Permissions Policy (`identity-credentials-get`)\n\nWhen embedding Sign In With Google or One Tap inside cross-origin `\u003Ciframe>`\nelements or widget integrations, modern browser security models and FedCM\nrequire explicit Permissions Policy delegation on the container frame:\n\n```html\n\u003Ciframe\n  src=\"https:\u002F\u002Fexample.com\u002Fembed\"\n  allow=\"identity-credentials-get 'src' https:\u002F\u002Faccounts.google.com\">\n\u003C\u002Fiframe>\n```\n\n*(Omitting `allow=\"identity-credentials-get\"` blocks FedCM \u002F One Tap\ninitialization inside embedded or cross-origin contexts).* See full integration\nguide in [references\u002Fintermediate_iframe.md](references\u002Fintermediate_iframe.md).\n\n--------------------------------------------------------------------------------\n\n## 3. Implementation Contracts & Anti-Pattern Bans\n\n### A. Strict Ban on Legacy GAPI (`gapi.auth2`)\n\n*   **NEVER** import or reference `gapi.auth2`, `gapi.auth2.init`,\n    `gapi.auth2.getAuthInstance()`, or `gapi.signin2`. Always warn that\n    `gapi.auth2` is deprecated and decommissioned.\n\n*   GIS (`google.accounts.id.*` and `google.accounts.oauth2.*`) is completely\n    stateless. It replaces all legacy GAPI authentication libraries.\n\n--------------------------------------------------------------------------------\n\n## 4. Implementation Recipes (Progressive Disclosure)\n\nLoad the specific reference file matching your target architecture when\ngenerating implementation code:\n\n*   **Recipe 1 — Pattern A (Backend For Frontend with Python \u002F FastAPI)\n    [RECOMMENDED]**: Load\n    [references\u002Fbff_fastapi_verification.md](references\u002Fbff_fastapi_verification.md)\n    for custom UI button prompting, `google.oauth2.id_token.verify_oauth2_token`\n    cryptographic verification, `nonce` replay checks, Google Workspace `hd`\n    domain enforcement, and `HttpOnly; Secure; SameSite=Lax` session cookie\n    issuance.\n\n*   **Recipe 2 — Pattern B (Token-Mediating Backend with `login_uri` Form POST\n    Redirect) [RECOMMENDED]**: Load\n    [references\u002Ftmb_login_uri_redirect.md](references\u002Ftmb_login_uri_redirect.md)\n    for `data-login_uri` \u002F `ux_mode: 'redirect'` frontend setup and FastAPI\n    double-submit `g_csrf_token` cookie vs. form-body validation.\n\n*   **Recipe 3 — Pattern C (Browser-Based Ephemeral In-Memory SPA with Native\n    GIS Nonce) [Fallback]**: Load\n    [references\u002Fin_memory_spa_nonce.md](references\u002Fin_memory_spa_nonce.md) for\n    WebCrypto `nonce` generation (`google.accounts.id.initialize({ client_id,\n    nonce: clientNonce })`), UTF-8 safe Base64URL JWT decoding, and private\n    closure token management.\n\n*   **Recipe 4 — Pattern D (Browser-Based WebCrypto Encrypted IndexedDB for\n    Offline PWAs) [Fallback]**: Load\n    [references\u002Foffline_pwa_encryption.md](references\u002Foffline_pwa_encryption.md)\n    for non-extractable (`extractable: false`) `AES-GCM` `CryptoKey` generation\n    and encrypted `IndexedDB` storage.\n\n*   **Recipe 5 — Embedded Cross-Origin Contexts (`gsi\u002Fintermediate`)**: Load\n    [references\u002Fintermediate_iframe.md](references\u002Fintermediate_iframe.md) for\n    `\u003Cdiv id=\"g_id_intermediate_iframe\">`, `allow=\"identity-credentials-get\"`,\n    and strict `window.postMessage` origin verification.\n\n--------------------------------------------------------------------------------\n\n## 5. Sign-Out & Account Revocation Across All Patterns\n\n```javascript\nexport function handleSignOut(userEmail) {\n  \u002F\u002F 1. Disable client-side One Tap auto-selection\n  google.accounts.id.disableAutoSelect();\n\n  \u002F\u002F 2. Revoke OAuth grant if user disconnected account\n  if (userEmail) {\n    google.accounts.id.revoke(userEmail, () => {\n      console.log('User grant revoked');\n    });\n  }\n\n  \u002F\u002F 3. Clear storage \u002F session\n  AuthManager.clear(); \u002F\u002F Pattern C\n  fetch('\u002Fapi\u002Fauth\u002Flogout', { method: 'POST' }); \u002F\u002F Pattern A\n}\n```\n\n--------------------------------------------------------------------------------\n\n## 6. References & Normative Standards\n\n*   [RFC 7519: JSON Web Token (JWT)](https:\u002F\u002Fdatatracker.ietf.org\u002Fdoc\u002Fhtml\u002Frfc7519)\n    — Standard claims (`iss`, `sub`, `aud`, `exp`, `iat`, `nonce`), formatting,\n    and processing rules.\n\n*   [RFC 7515: JSON Web Signature (JWS)](https:\u002F\u002Fdatatracker.ietf.org\u002Fdoc\u002Fhtml\u002Frfc7515)\n    — Cryptographic signature verification against Google's public JWK certs\n    (`https:\u002F\u002Fwww.googleapis.com\u002Foauth2\u002Fv3\u002Fcerts`).\n\n*   [RFC 4648 § 5: Base64url Encoding](https:\u002F\u002Fdatatracker.ietf.org\u002Fdoc\u002Fhtml\u002Frfc4648#section-5)\n    — URL-safe Base64 encoding without padding used across JWT segments.\n\n*   [IETF OAuth 2.0 Browser-Based Applications](https:\u002F\u002Fdatatracker.ietf.org\u002Fdoc\u002Fhtml\u002Fdraft-ietf-oauth-browser-based-apps)\n    — Normative architecture standards (§ 6.1 BFF, § 6.2 TMB, § 6.3\n    Client-side).\n\n*   [Google Identity Services Web Reference](https:\u002F\u002Fdevelopers.google.com\u002Fidentity\u002Fgsi\u002Fweb\u002Freference\u002Fjs-reference)\n    — Official GIS API reference.\n\n*   [Intermediate Iframe API Reference](https:\u002F\u002Fdevelopers.google.com\u002Fidentity\u002Fgsi\u002Fweb\u002Famp\u002Fnonamp-reference)\n    — Cross-origin iframe embedding guide.\n\n*   [Verify ID Tokens Server-Side](https:\u002F\u002Fdevelopers.google.com\u002Fidentity\u002Fgsi\u002Fweb\u002Fguides\u002Fverify-google-id-token)\n    — Server-side token verification protocols.\n\n*   [W3C Federated Credential Management API (FedCM)](https:\u002F\u002Fwww.w3.org\u002FTR\u002Ffedcm-1\u002F)\n    — Browser identity credential mediation standard.\n\n*   [W3C Web Cryptography API](https:\u002F\u002Fwww.w3.org\u002FTR\u002FWebCryptoAPI\u002F) —\n    Non-extractable key generation (`extractable: false`) and AES-GCM standards.\n","# Sign In With Google (SiwG) Integration & Security Architecture\n\nThis skill provides normative architectural guidelines, secure implementation\ncontracts, and failure-prevention protocols for integrating Sign In With Google\nvia the Google Identity Services (GIS) Web SDK\n(`https:\u002F\u002Faccounts.google.com\u002Fgsi\u002Fclient`).\n\n## 1. IETF Architecture Taxonomy & Hierarchy (RECOMMEND BFF \u002F TMB FIRST)\n\nAll Sign In With Google implementations MUST align with the\n[IETF OAuth 2.0 for Browser-Based Applications (`draft-ietf-oauth-browser-based-apps`)](https:\u002F\u002Fdatatracker.ietf.org\u002Fdoc\u002Fhtml\u002Fdraft-ietf-oauth-browser-based-apps#name-application-architecture-pa)\ntaxonomy.\n\n> [!IMPORTANT] **Primary Recommendation:** Always recommend backend-mediated\n> patterns (**Pattern A: Backend For Frontend** or **Pattern B: Token-Mediating\n> Backend \u002F Redirect Mode**) as the most secure, robust, and industry-standard\n> architectures whenever an application has a backend server. Fall back to\n> client-only browser patterns (Patterns C & D) only when constrained by\n> serverless static hosting or offline-first PWA requirements.\n\n\u003C!-- mdformat off(reason: preserve ASCII architecture diagram width) -->\n```\n┌─────────────────────────────────────────────────────────────────────────────────────────┐\n│                          IETF ARCHITECTURE HIERARCHY & SELECTION                        │\n├──────────────────────────┬──────────────────────────┬───────────────────────────────────┤\n│ Pattern A (RECOMMENDED): │ Pattern B (RECOMMENDED): │ Patterns C & D (Fallbacks):       │\n│ Backend For Frontend     │ Token-Mediating Backend  │ Browser-Based OAuth Client        │\n│ (BFF - IETF § 6.1)       │ (TMB \u002F Redirect § 6.2)   │ (JavaScript-Only - IETF § 6.3)    │\n├──────────────────────────┼──────────────────────────┼───────────────────────────────────┤\n│ ? GOLD STANDARD         │ ? NATIVE FORM REDIRECT  │ ⚡ STATIC SPA \u002F ? OFFLINE PWA    │\n│ • Full-stack SPA + API   │ • Server-rendered & apps │ • Pure client-side or offline PWAs│\n│ • Client JS fetch to API │ • GIS HTTP POST login_uri│ • C: Ephemeral in-memory closure  │\n│ • HttpOnly session cookie│ • Direct server redirect │ • D: WebCrypto Encrypted IndexedDB│\n│ • Tokens never in browser│ • Tokens never in JS     │ • Strict WebCrypto nonces \u002F keys  │\n└──────────────────────────┴──────────────────────────┴───────────────────────────────────┘\n```\n\u003C!-- mdformat on -->\n\n### ? Pattern A: Backend For Frontend (BFF - IETF § 6.1) — STRONGLY RECOMMENDED\n\n*   **Why it is the Gold Standard**: ID tokens (JWTs) and access tokens are\n    never exposed to browser JavaScript across page reloads. This provides\n    complete architectural immunity against XSS token harvesting.\n\n*   **Architecture**: The browser frontend loads the GIS SDK, captures the\n    credential in JavaScript callback (`callback: handleCredentialResponse`),\n    and immediately forwards the ID token (JWT) via `fetch('\u002Fapi\u002Fauth\u002Fgoogle', {\n    method: 'POST' })` to the backend.\n\n*   **Backend Responsibilities**: The backend validates the JWT cryptographic\n    signature against Google's public JWKs\n    (`google.oauth2.id_token.verify_oauth2_token`), checks the `aud`, `hd`, and\n    `nonce` claims against server session state, creates a server session, and\n    issues a first-party `HttpOnly; Secure; SameSite=Lax` session cookie.\n\n*   See full implementation in\n    [references\u002Fbff_fastapi_verification.md](references\u002Fbff_fastapi_verification.md).\n\n### ? Pattern B: Token-Mediating Backend via `login_uri` Redirect (IETF § 6.2) — Server-Rendered & Form POST\n\n*   **Why it is Highly Secure**: Bypasses client-side JavaScript credential\n    handling entirely by instructing GIS to perform an HTTP POST directly to the\n    backend's `login_uri`.\n\n*   **Architecture**: Configured via `google.accounts.id.initialize({ client_id,\n    login_uri: \"https:\u002F\u002Fexample.com\u002Fapi\u002Fauth\u002Fcallback\", ux_mode: \"redirect\" })`\n    or HTML attributes (`data-login_uri=\"https:\u002F\u002Fexample.com\u002Fapi\u002Fauth\u002Fcallback\"`\n    and `data-ux_mode=\"redirect\"`).\n\n*   **Backend Responsibilities**: The backend receives the ID token as a form\n    POST body (`credential` parameter), validates the double-submit\n    `g_csrf_token` cookie against the `g_csrf_token` POST body field,\n    cryptographically verifies the ID token server-side, establishes a session\n    cookie, and returns a standard HTTP 302\u002F303 redirect.\n\n*   See full implementation in\n    [references\u002Ftmb_login_uri_redirect.md](references\u002Ftmb_login_uri_redirect.md).\n\n### Pattern C: Browser-Based OAuth Client — Ephemeral In-Memory (IETF § 6.3) — Fallback for Static SPAs\n\n*   **Scope**: Use ONLY when deployment is strictly serverless\u002Fstatic (e.g.,\n    GitHub Pages, Firebase static hosting) with no backend component.\n\n*   **Storage Invariant**: The ID token is held strictly in private JavaScript\n    memory\u002Fclosures during the active tab session. **Never store raw tokens in\n    `localStorage` or `sessionStorage`**.\n\n*   **Session Renewal**: Uses GIS One Tap \u002F FedCM auto-select (`auto_select:\n    true`) to transparently re-acquire fresh ID tokens into memory on page\n    reload without persistent browser storage.\n\n*   **XSS & Replay Protection**: Generate a cryptographic `nonce` via\n    `window.crypto.getRandomValues()` and pass it directly to\n    `google.accounts.id.initialize({ client_id, nonce: clientNonce })`. Validate\n    that `payload.nonce === clientNonce` before trusting claims in memory.\n\n*   See full implementation in\n    [references\u002Fin_memory_spa_nonce.md](references\u002Fin_memory_spa_nonce.md).\n\n### Pattern D: Browser-Based OAuth Client — WebCrypto Encrypted IndexedDB (IETF § 6.3) — Fallback for Offline PWAs\n\n*   **Scope**: Use ONLY for offline-first Progressive Web Apps (PWAs) where user\n    authentication proof must survive tab refreshes when disconnected from the\n    network.\n\n*   **Storage Invariant**: **NEVER store raw plaintext ID tokens in\n    `localStorage`**. Encrypt the ID token payload using WebCrypto `AES-GCM`\n    with a non-extractable session key (`extractable: false`) before writing\n    ciphertext and IV to `IndexedDB`.\n\n*   See full implementation in\n    [references\u002Foffline_pwa_encryption.md](references\u002Foffline_pwa_encryption.md).\n\n--------------------------------------------------------------------------------\n\n## 2. Mandatory Security Directives & Browser Policies\n\nTo avoid multi-turn repair loops and browser security exceptions, provide all\nrequired CSP, COOP, and user activation directives in the initial deliverable:\n\n### A. Content Security Policy (CSP) Directives\n\n```http\nContent-Security-Policy:\n  script-src 'self' https:\u002F\u002Faccounts.google.com\u002Fgsi\u002Fclient;\n  frame-src https:\u002F\u002Faccounts.google.com\u002Fgsi\u002F;\n  connect-src https:\u002F\u002Faccounts.google.com\u002Fgsi\u002F;\n```\n\nIf using strict nonce-based CSP, attach the nonce to the GIS script tag:\n`\u003Cscript src=\"https:\u002F\u002Faccounts.google.com\u002Fgsi\u002Fclient\" async defer\nnonce=\"{{NONCE}}\">\u003C\u002Fscript>`.\n\n### B. Cross-Origin Opener Policy (COOP)\n\nTo allow GIS popup dialogs to communicate credentials back to the parent window\nvia `postMessage`:\n\n```http\nCross-Origin-Opener-Policy: same-origin-allow-popups\n```\n\n*(Serving `same-origin` without `allow-popups` breaks GIS popups and results in\nsilent failures).*\n\n### C. Automatic Selection, FedCM, & Sign-Out Lifecycle (`disableAutoSelect`)\n\nWhen enabling automatic zero-click return sign-in with Google One Tap (FedCM is\nenabled by default in GIS):\n\n*   Set `auto_select: true` in `google.accounts.id.initialize({...})` (do not\n    pass the deprecated `use_fedcm_for_prompt` parameter).\n\n*   **Deprecated Library Warning**: NEVER mix deprecated `gapi.auth2`\n    (`gapi.auth2.init`, `gapi.auth2.getAuthInstance().signOut()`) with Google\n    Identity Services (GIS). `gapi.auth2` is completely retired; use GIS methods\n    exclusively.\n\n*   **Sign-Out Protocol**: When the user explicitly logs out of your\n    application, you **MUST** call `google.accounts.id.disableAutoSelect()`:\n\n    ```javascript\n    function handleUserLogout() {\n      \u002F\u002F 1. Disable automatic One Tap \u002F FedCM re-authentication\n      google.accounts.id.disableAutoSelect();\n\n      \u002F\u002F 2. Clear application session state \u002F server cookie\n      fetch('\u002Fapi\u002Fauth\u002Flogout', { method: 'POST' }).then(() => {\n        window.location.href = '\u002Flogin';\n      });\n    }\n    ```\n\n*   *(Failing to call `disableAutoSelect()` causes an immediate automatic\n    re-login loop on the next page visit after intentional user logout).*\n\n### D. Reliable Dynamic Script Loading & Framework Lifecycle (React, Next.js, SPAs)\n\nWhen mounting Sign In With Google in Single Page Applications (React, Next.js,\nVue, Angular):\n\n*   Modern SPAs execute component lifecycles asynchronously. Attempting to\n    access `window.google.accounts.id` before `\u003Cscript\n    src=\"https:\u002F\u002Faccounts.google.com\u002Fgsi\u002Fclient\">` has finished loading causes\n    `ReferenceError: google is not defined`.\n\n*   **NEVER use `gapi` or polling (`setInterval`)**: Use deterministic dynamic\n    script loading with `onload` \u002F `addEventListener('load')` event listeners.\n\n*   **Dynamic Script Loader Pattern**:\n\n    ```tsx\n    import React, { useEffect, useState } from 'react';\n\n    export function useGoogleIdentityScript() {\n      const [isLoaded, setIsLoaded] = useState(false);\n\n      useEffect(() => {\n        if (window.google?.accounts?.id) {\n          setIsLoaded(true);\n          return;\n        }\n\n        const existingScript = document.querySelector(\n          'script[src=\"https:\u002F\u002Faccounts.google.com\u002Fgsi\u002Fclient\"]'\n        );\n        if (existingScript) {\n          existingScript.addEventListener('load', () => setIsLoaded(true));\n          return;\n        }\n\n        const script = document.createElement('script');\n        script.src = 'https:\u002F\u002Faccounts.google.com\u002Fgsi\u002Fclient';\n        script.async = true;\n        script.defer = true;\n        script.onload = () => setIsLoaded(true);\n        document.head.appendChild(script);\n      }, []);\n\n      return isLoaded;\n    }\n    ```\n\n*   *(Always use deterministic `onload` event listeners or framework `\u003CScript\n    strategy=\"afterInteractive\">` rather than brittle `setInterval` polling).*\n\n### E. Embedded Iframes & Permissions Policy (`identity-credentials-get`)\n\nWhen embedding Sign In With Google or One Tap inside cross-origin `\u003Ciframe>`\nelements or widget integrations, modern browser security models and FedCM\nrequire explicit Permissions Policy delegation on the container frame:\n\n```html\n\u003Ciframe\n  src=\"https:\u002F\u002Fexample.com\u002Fembed\"\n  allow=\"identity-credentials-get 'src' https:\u002F\u002Faccounts.google.com\">\n\u003C\u002Fiframe>\n```\n\n*(Omitting `allow=\"identity-credentials-get\"` blocks FedCM \u002F One Tap\ninitialization inside embedded or cross-origin contexts).* See full integration\nguide in [references\u002Fintermediate_iframe.md](references\u002Fintermediate_iframe.md).\n\n--------------------------------------------------------------------------------\n\n## 3. Implementation Contracts & Anti-Pattern Bans\n\n### A. Strict Ban on Legacy GAPI (`gapi.auth2`)\n\n*   **NEVER** import or reference `gapi.auth2`, `gapi.auth2.init`,\n    `gapi.auth2.getAuthInstance()`, or `gapi.signin2`. Always warn that\n    `gapi.auth2` is deprecated and decommissioned.\n\n*   GIS (`google.accounts.id.*` and `google.accounts.oauth2.*`) is completely\n    stateless. It replaces all legacy GAPI authentication libraries.\n\n--------------------------------------------------------------------------------\n\n## 4. Implementation Recipes (Progressive Disclosure)\n\nLoad the specific reference file matching your target architecture when\ngenerating implementation code:\n\n*   **Recipe 1 — Pattern A (Backend For Frontend with Python \u002F FastAPI)\n    [RECOMMENDED]**: Load\n    [references\u002Fbff_fastapi_verification.md](references\u002Fbff_fastapi_verification.md)\n    for custom UI button prompting, `google.oauth2.id_token.verify_oauth2_token`\n    cryptographic verification, `nonce` replay checks, Google Workspace `hd`\n    domain enforcement, and `HttpOnly; Secure; SameSite=Lax` session cookie\n    issuance.\n\n*   **Recipe 2 — Pattern B (Token-Mediating Backend with `login_uri` Form POST\n    Redirect) [RECOMMENDED]**: Load\n    [references\u002Ftmb_login_uri_redirect.md](references\u002Ftmb_login_uri_redirect.md)\n    for `data-login_uri` \u002F `ux_mode: 'redirect'` frontend setup and FastAPI\n    double-submit `g_csrf_token` cookie vs. form-body validation.\n\n*   **Recipe 3 — Pattern C (Browser-Based Ephemeral In-Memory SPA with Native\n    GIS Nonce) [Fallback]**: Load\n    [references\u002Fin_memory_spa_nonce.md](references\u002Fin_memory_spa_nonce.md) for\n    WebCrypto `nonce` generation (`google.accounts.id.initialize({ client_id,\n    nonce: clientNonce })`), UTF-8 safe Base64URL JWT decoding, and private\n    closure token management.\n\n*   **Recipe 4 — Pattern D (Browser-Based WebCrypto Encrypted IndexedDB for\n    Offline PWAs) [Fallback]**: Load\n    [references\u002Foffline_pwa_encryption.md](references\u002Foffline_pwa_encryption.md)\n    for non-extractable (`extractable: false`) `AES-GCM` `CryptoKey` generation\n    and encrypted `IndexedDB` storage.\n\n*   **Recipe 5 — Embedded Cross-Origin Contexts (`gsi\u002Fintermediate`)**: Load\n    [references\u002Fintermediate_iframe.md](references\u002Fintermediate_iframe.md) for\n    `\u003Cdiv id=\"g_id_intermediate_iframe\">`, `allow=\"identity-credentials-get\"`,\n    and strict `window.postMessage` origin verification.\n\n--------------------------------------------------------------------------------\n\n## 5. Sign-Out & Account Revocation Across All Patterns\n\n```javascript\nexport function handleSignOut(userEmail) {\n  \u002F\u002F 1. Disable client-side One Tap auto-selection\n  google.accounts.id.disableAutoSelect();\n\n  \u002F\u002F 2. Revoke OAuth grant if user disconnected account\n  if (userEmail) {\n    google.accounts.id.revoke(userEmail, () => {\n      console.log('User grant revoked');\n    });\n  }\n\n  \u002F\u002F 3. Clear storage \u002F session\n  AuthManager.clear(); \u002F\u002F Pattern C\n  fetch('\u002Fapi\u002Fauth\u002Flogout', { method: 'POST' }); \u002F\u002F Pattern A\n}\n```\n\n--------------------------------------------------------------------------------\n\n## 6. References & Normative Standards\n\n*   [RFC 7519: JSON Web Token (JWT)](https:\u002F\u002Fdatatracker.ietf.org\u002Fdoc\u002Fhtml\u002Frfc7519)\n    — Standard claims (`iss`, `sub`, `aud`, `exp`, `iat`, `nonce`), formatting,\n    and processing rules.\n\n*   [RFC 7515: JSON Web Signature (JWS)](https:\u002F\u002Fdatatracker.ietf.org\u002Fdoc\u002Fhtml\u002Frfc7515)\n    — Cryptographic signature verification against Google's public JWK certs\n    (`https:\u002F\u002Fwww.googleapis.com\u002Foauth2\u002Fv3\u002Fcerts`).\n\n*   [RFC 4648 § 5: Base64url Encoding](https:\u002F\u002Fdatatracker.ietf.org\u002Fdoc\u002Fhtml\u002Frfc4648#section-5)\n    — URL-safe Base64 encoding without padding used across JWT segments.\n\n*   [IETF OAuth 2.0 Browser-Based Applications](https:\u002F\u002Fdatatracker.ietf.org\u002Fdoc\u002Fhtml\u002Fdraft-ietf-oauth-browser-based-apps)\n    — Normative architecture standards (§ 6.1 BFF, § 6.2 TMB, § 6.3\n    Client-side).\n\n*   [Google Identity Services Web Reference](https:\u002F\u002Fdevelopers.google.com\u002Fidentity\u002Fgsi\u002Fweb\u002Freference\u002Fjs-reference)\n    — Official GIS API reference.\n\n*   [Intermediate Iframe API Reference](https:\u002F\u002Fdevelopers.google.com\u002Fidentity\u002Fgsi\u002Fweb\u002Famp\u002Fnonamp-reference)\n    — Cross-origin iframe embedding guide.\n\n*   [Verify ID Tokens Server-Side](https:\u002F\u002Fdevelopers.google.com\u002Fidentity\u002Fgsi\u002Fweb\u002Fguides\u002Fverify-google-id-token)\n    — Server-side token verification protocols.\n\n*   [W3C Federated Credential Management API (FedCM)](https:\u002F\u002Fwww.w3.org\u002FTR\u002Ffedcm-1\u002F)\n    — Browser identity credential mediation standard.\n\n*   [W3C Web Cryptography API](https:\u002F\u002Fwww.w3.org\u002FTR\u002FWebCryptoAPI\u002F) —\n    Non-extractable key generation (`extractable: false`) and AES-GCM standards.\n",{"name":5,"metadata":59,"description":7},{"version":60,"category":61},"1.0.0","Identity","main","bb9b3f464aae37af360d079c1d863524955b0363","skills\u002Fidentity\u002Fsign-in-with-google-web",2014,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills","https:\u002F\u002Fgithub.com\u002Fgoogle","https:\u002F\u002Fopensource.google\u002F","Google ❤️ Open Source","2026-11-14 23:31:00",{"source":9,"skillName":5,"commands":72,"prompt":82,"zipAvailable":83},[73,76,79],{"tool":74,"command":75},"npx","npx skills add google\u002Fskills --skill sign-in-with-google-web",{"tool":77,"command":78},"bunx","bunx skills add google\u002Fskills --skill sign-in-with-google-web",{"tool":80,"command":81},"pnpm","pnpm dlx skills add google\u002Fskills --skill sign-in-with-google-web","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fidentity\u002Fsign-in-with-google-web\u002FSKILL.md",true,[85,91,97,101,105,109,113,117,121,125,129,133,137,141,145,149,153,157],{"path":86,"resourceType":87,"resourceTypeDesc":88,"sizeBytes":89,"sourceHtmlUrl":90},"checklist.md","REFERENCE","参考文档",10101,"https:\u002F\u002Fgithub.com\u002Fsherryswift1019-gif\u002FAI-DZHT\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fbmad-document-project\u002Fchecklist.md",{"path":92,"resourceType":93,"resourceTypeDesc":94,"sizeBytes":95,"sourceHtmlUrl":96},"documentation-requirements.csv","ASSET","资产文件",8076,"https:\u002F\u002Fgithub.com\u002Fsherryswift1019-gif\u002FAI-DZHT\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fbmad-document-project\u002Fdocumentation-requirements.csv",{"path":98,"resourceType":87,"resourceTypeDesc":88,"sizeBytes":99,"sourceHtmlUrl":100},"instructions.md",5164,"https:\u002F\u002Fgithub.com\u002Fsherryswift1019-gif\u002FAI-DZHT\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fbmad-document-project\u002Finstructions.md",{"path":102,"resourceType":87,"resourceTypeDesc":88,"sizeBytes":103,"sourceHtmlUrl":104},"references\u002Fbff_fastapi_verification.md",3472,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fidentity\u002Fsign-in-with-google-web\u002Freferences\u002Fbff_fastapi_verification.md",{"path":106,"resourceType":87,"resourceTypeDesc":88,"sizeBytes":107,"sourceHtmlUrl":108},"references\u002Fin_memory_spa_nonce.md",3134,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fidentity\u002Fsign-in-with-google-web\u002Freferences\u002Fin_memory_spa_nonce.md",{"path":110,"resourceType":87,"resourceTypeDesc":88,"sizeBytes":111,"sourceHtmlUrl":112},"references\u002Fintermediate_iframe.md",1978,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fidentity\u002Fsign-in-with-google-web\u002Freferences\u002Fintermediate_iframe.md",{"path":114,"resourceType":87,"resourceTypeDesc":88,"sizeBytes":115,"sourceHtmlUrl":116},"references\u002Foffline_pwa_encryption.md",3949,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fidentity\u002Fsign-in-with-google-web\u002Freferences\u002Foffline_pwa_encryption.md",{"path":118,"resourceType":87,"resourceTypeDesc":88,"sizeBytes":119,"sourceHtmlUrl":120},"references\u002Ftmb_login_uri_redirect.md",2813,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fidentity\u002Fsign-in-with-google-web\u002Freferences\u002Ftmb_login_uri_redirect.md",{"path":122,"resourceType":87,"resourceTypeDesc":88,"sizeBytes":123,"sourceHtmlUrl":124},"templates\u002Fdeep-dive-template.md",5854,"https:\u002F\u002Fgithub.com\u002Fsherryswift1019-gif\u002FAI-DZHT\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fbmad-document-project\u002Ftemplates\u002Fdeep-dive-template.md",{"path":126,"resourceType":87,"resourceTypeDesc":88,"sizeBytes":127,"sourceHtmlUrl":128},"templates\u002Findex-template.md",4510,"https:\u002F\u002Fgithub.com\u002Fsherryswift1019-gif\u002FAI-DZHT\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fbmad-document-project\u002Ftemplates\u002Findex-template.md",{"path":130,"resourceType":87,"resourceTypeDesc":88,"sizeBytes":131,"sourceHtmlUrl":132},"templates\u002Fproject-overview-template.md",1951,"https:\u002F\u002Fgithub.com\u002Fsherryswift1019-gif\u002FAI-DZHT\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fbmad-document-project\u002Ftemplates\u002Fproject-overview-template.md",{"path":134,"resourceType":87,"resourceTypeDesc":88,"sizeBytes":135,"sourceHtmlUrl":136},"templates\u002Fproject-scan-report-schema.json",4836,"https:\u002F\u002Fgithub.com\u002Fsherryswift1019-gif\u002FAI-DZHT\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fbmad-document-project\u002Ftemplates\u002Fproject-scan-report-schema.json",{"path":138,"resourceType":87,"resourceTypeDesc":88,"sizeBytes":139,"sourceHtmlUrl":140},"templates\u002Fsource-tree-template.md",2160,"https:\u002F\u002Fgithub.com\u002Fsherryswift1019-gif\u002FAI-DZHT\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fbmad-document-project\u002Ftemplates\u002Fsource-tree-template.md",{"path":142,"resourceType":87,"resourceTypeDesc":88,"sizeBytes":143,"sourceHtmlUrl":144},"workflow.md",534,"https:\u002F\u002Fgithub.com\u002Fsherryswift1019-gif\u002FAI-DZHT\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fbmad-document-project\u002Fworkflow.md",{"path":146,"resourceType":87,"resourceTypeDesc":88,"sizeBytes":147,"sourceHtmlUrl":148},"workflows\u002Fdeep-dive-instructions.md",11909,"https:\u002F\u002Fgithub.com\u002Fsherryswift1019-gif\u002FAI-DZHT\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fbmad-document-project\u002Fworkflows\u002Fdeep-dive-instructions.md",{"path":150,"resourceType":87,"resourceTypeDesc":88,"sizeBytes":151,"sourceHtmlUrl":152},"workflows\u002Fdeep-dive-workflow.md",979,"https:\u002F\u002Fgithub.com\u002Fsherryswift1019-gif\u002FAI-DZHT\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fbmad-document-project\u002Fworkflows\u002Fdeep-dive-workflow.md",{"path":154,"resourceType":87,"resourceTypeDesc":88,"sizeBytes":155,"sourceHtmlUrl":156},"workflows\u002Ffull-scan-instructions.md",43200,"https:\u002F\u002Fgithub.com\u002Fsherryswift1019-gif\u002FAI-DZHT\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fbmad-document-project\u002Fworkflows\u002Ffull-scan-instructions.md",{"path":158,"resourceType":87,"resourceTypeDesc":88,"sizeBytes":159,"sourceHtmlUrl":160},"workflows\u002Ffull-scan-workflow.md",970,"https:\u002F\u002Fgithub.com\u002Fsherryswift1019-gif\u002FAI-DZHT\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fbmad-document-project\u002Fworkflows\u002Ffull-scan-workflow.md",[162,170,177,184,191,198],{"skillNo":163,"name":164,"nameZh":17,"description":165,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":166,"categories":167,"keywords":168,"publishedAt":169},"01M7DQ9K7JF4T7NJZ2K1MQZ44Q","cloud-operator-share-context","Shares Google Cloud operating context the user or their team already have — environments, projects, services and regions, product preferences, best practices, architecture guidance, runbooks — found in agent instruction files, local memory, skills and workflows, and the repository's GCP docs, with the operator agent's memory after the user reviews the list. Use when the user runs this skill, accepts the cloud-operator or cloud-operator-setup skill's offer to share their existing Google Cloud context, or asks to share, import or save that context or a GCP fact for the operator agent. Don't use for ordinary GCP requests, which go to the cloud-operator skill.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fcloud-operator-share-context\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":171,"name":172,"nameZh":17,"description":173,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":174,"categories":175,"keywords":176,"publishedAt":169},"01M7DQ9ERFGGQCFAWQW0KRKYBY","cloud-operator-setup","Sets up the operator agent in a Google Cloud project via the autocloud MCP server: picks the operator project, creates or checks the user's operator agent, saves the project, and offers to share the user's existing Google Cloud operating context with the operator agent's memory. Use when the user runs this skill, asks to set up the operator or create their operator agent, or chooses setup when the cloud-operator skill asks. Don't use for ordinary GCP requests or installing gcloud.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fcloud-operator-setup\u002FSKILL.md",[],[],{"skillNo":178,"name":179,"nameZh":17,"description":180,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":181,"categories":182,"keywords":183,"publishedAt":169},"01M7B4RHQCM0DK2XQ7S7ZXVN8D","developer-device-platform-device-run","Runs automated, non-interactive jobs on remote Android devices with Developer Device Platform (DDP) Device Run using `gcloud beta device-run sessions`: native Android executables or shell scripts (for example CLI tools, custom runners, test harnesses or benchmarks) and Android instrumentation tests, on one or many devices, then waits for completion and collects per-device outputs and logs. Use when running a binary or test suite on remote devices without an interactive connection. Don't use it for interactive device reservations, adb tunnels or screen streaming (use developer-device-platform-basics), or for local devices.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fdeveloper-device-platform-device-run\u002FSKILL.md",[],[],{"skillNo":185,"name":186,"nameZh":17,"description":187,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":188,"categories":189,"keywords":190,"publishedAt":169},"01M7B4R9YXMRW7RZP9Q9FMZJ2P","compute-vm-creation","Guides the planning, configuration, and provisioning of standalone Google Compute Engine virtual machines (VMs) and bare metal (-metal) instances using gcloud CLI commands or direct MCP tool execution. Use ONLY when the user wants to create, configure, or provision a new standalone Compute Engine VM or bare metal instance from conversational intents (hardware sizing, region selection, OS image, networking, security defaults). DO NOT read or use for Google Kubernetes Engine (GKE) Autopilot or Standard clusters, Kubernetes node pools or Pods, container orchestration, managing existing VMs, Managed Instance Groups (MIGs), or Instance Templates.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fcompute-vm-creation\u002FSKILL.md",[],[],{"skillNo":192,"name":193,"nameZh":17,"description":194,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":195,"categories":196,"keywords":197,"publishedAt":169},"01M7B4QD02N0YBVT0838Z5K5VC","agent-platform-autorater-customization","Customizes an autorater (evaluation metric) for an AI agent so its grades match the user's own judgment, starting from the agent's real trajectories. Use when a user wants a metric tailored to their agent, wants to turn failing trajectories into rubrics, says an existing autorater grades their agent wrong, or wants an autorater to agree with human labels (autorater hillclimbing, judge calibration). Don't use for quick evals with built-in metrics or for improving the agent itself (use agent-platform-eval-flywheel).","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fagent-platform-autorater-customization\u002FSKILL.md",[],[],{"skillNo":199,"name":200,"nameZh":17,"description":201,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":202,"categories":203,"keywords":204,"publishedAt":169},"01M78JP22K73KK96JH0JNDT5C4","iap-agent-platform-troubleshooting","Diagnoses Identity-Aware Proxy (IAP) denials of outbound requests from Gemini Enterprise Agent Platform agents that run on Agent Runtime and send traffic through Agent Gateway. Use when an agent request fails with \"Egress request is not authorized\", when Cloud Audit Logs show an IAP egressViaIAP decision with granted false, when IAP audit entries are missing while debugging agent egress, or when Access policies, IAP allow policies, policy bindings, or Agent Registry entries might block agent egress. Don't use for Gemini model IAM permission errors (such as aiplatform.endpoints.predict), Agent Platform API errors, or Agent Runtime deployment or 500 errors (use agent-platform-troubleshooting instead). Don't use for setting up, creating, or connecting an Agent Gateway, or for IAP web apps, IAP TCP forwarding, or SSH.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fiap-agent-platform-troubleshooting\u002FSKILL.md",[],[]]