Google uses AI technology to translate content into your preferred language. AI translations can contain errors.
Web Authentication API
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
整合商必須實作網站主機將使用者重新導向,以便進行驗證。這項驗證是不同的形態,但用途與 Android 驗證提供的驗證相同。網站代管商必須為適合透過行動裝置瀏覽的網站。
網站代管商必須根據使用者代理程式標頭值,判斷行動版網站要求和電腦版網路要求。使用行動網頁要求傳送的網頁必須適用於 Android 和 iOS 的行動版網站。除了使用者代理程式標頭值之外,用戶端不會提供其他提示,讓您瞭解使用者提出要求的環境 (電腦或網頁)。
伺服器必須使用 GET 導入 HTTPS 通訊協定。整合商可以定義路徑和主機,整合商必須支援 2,048 個半形字元的網址。包括配置、主機、通訊埠、路徑和參數。
所有參數都會先以 UTF-8 編碼,再進行網址編碼。
要求
收到要求後,Google 會提供以下項目做為網址參數:
| 欄位 |
gspMajorVersion
|
int
此要求的主要版本號碼。
|
gspAuthenticationRequest
|
AuthenticationRequest
驗證要求。 |
gspAssociationId
|
string
如果有,整合商會使用這組 ID 來查詢已驗證的使用者的憑證。如果沒有顯示這項資訊,使用者可以選擇變更帳戶識別資訊。 |
gspCallbackUrl
|
string
為了完成 Google 驗證流程,重新導向使用者的網址。這個值經過網址編碼。
|
回應
完成驗證後,您必須使用 HTTPS GET 將使用者重新導向至 gspCallbackUrl。這個網址必須包含下列查詢參數:
| 欄位 |
gspResult
|
int
100
|
驗證成功。
|
201
|
使用者手動取消流程,且應取消流程。 |
202
|
驗證程序因嚴重原因而失敗,應取消流程。 |
|
gspAuthenticationResponse
|
AuthenticationResponse
驗證回應。 |
保留所有權利。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-25 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-07-25 (世界標準時間)。"],[],["Integrators must host a mobile-friendly website for user authentication, distinguishing between mobile and desktop requests via the user-agent header. The server must utilize HTTPS GET, with a definable path and host, supporting URLs up to 2,048 characters. Google provides parameters like `gspMajorVersion`, `gspAuthenticationRequest`, `gspAssociationId`, and `gspCallbackUrl` within the request. Upon authentication completion, the user is redirected to `gspCallbackUrl` via HTTPS GET, including `gspResult` and `gspAuthenticationResponse` parameters. All parameters are UTF-8 and URL-encoded.\n"]]