/sign-in-with-google-web
在各種網頁架構中,使用 Google Identity Services(GIS)實作、設定並保護 Sign In With Google(SiwG)。用於建立 Google 登入按鈕、搭配 FedCM 的 One Tap,以及整合 React、Next.js、Angular、HTML。
- 安裝次數
- 1200
- 專案星數
- 2.2 萬 ★
- 授權
- Apache-2.0
- 專案更新
- 2026-11-02
怎麼裝
npx skills add https://github.com/google/skills --skill sign-in-with-google-web安裝前請先看過原文內容。中文說明是 AI 翻譯,不保證安全。
原文
Implement, configure, and secure Sign In With Google (SiwG) using Google Identity Services (GIS / `https://accounts.google.com/gsi/client`) across web architectures. Use when creating Google sign-in buttons, implementing Google One Tap with FedCM, integrating GIS in React/Next.js/Angular/HTML, verifying ID tokens on backend runtimes (Python/Node.js/Go/Java), 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://accounts.google.com/gsi/intermediate`), 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/iOS native Credential Manager.