Skip to main content
Google One-tap lets users sign in with a single tap using their Google account. The frontend shows Google’s prompt, the backend verifies the ID token via Google’s JWKS. No Google SDK needed server-side.

Setup

1

Get a client ID

Go to the Google Cloud Console, create an OAuth 2.0 credential, copy the Client ID.
2

Configure the plugin

3

Add Google’s script to your frontend

How it works

  1. Google’s JS shows a sign-in prompt on your page
  2. User taps their Google account
  3. Google sends a credential (JWT ID token) to your callback
  4. KavachOS verifies the JWT against Google’s JWKS (https://www.googleapis.com/oauth2/v3/certs)
  5. Validates audience, issuer, expiry, and CSRF token
  6. Creates or links the user, returns a session

CSRF protection

Google sends a g_csrf_token cookie with the request. KavachOS validates that the cookie value matches the g_csrf_token field in the POST body.

Config

Endpoint

Google One-tap requires HTTPS in production. It works on localhost for development.
Last modified on April 29, 2026