Google's own button is skipped entirely — this is a plain
<button> styled however you like. Clicking it
calls google.accounts.id.prompt(), which still opens
Google's account chooser and returns the same signed ID token.
Useful when the design system doesn't allow Google's stock
button.
Raw response from Google (encoded JWT credential):
Decoded ID token payload:
Decoding above is not verification — it's just base64-decoding the JWT's middle segment. Anyone can craft a fake JWT with any payload they like; decoding it locally proves nothing about who actually sent it.
Real verification checks that Google actually signed the token:
iss is accounts.google.comaud matches your OAuth client IDexp hasn't passedkidClick "Verify with Google" to call Google's tokeninfo endpoint:
GET https://oauth2.googleapis.com/tokeninfo?id_token=<the JWT>
It performs exactly the checks above and only echoes the
claims back if they're valid (otherwise it responds with an
error_description) — this is the same kind of
call your previous backend was making (directly, or via a
JWT/JWKS library doing the same check locally instead of
calling Google over the network).
End-to-end flow:
gsi/client scriptgoogle.accounts.id.prompt()