Verify Google One Tap ID Token and generate magic link

GET /api/google-one-tap/verify

Verify the Google One Tap ID Token, check if the user exists, and generate a magic link for authentication. If the user exists, generates a login magic link; otherwise, generates a registration magic link.

Query parameters

  • idToken string Required

Responses

  • 200 application/json

    The ID Token was verified successfully and one-time token was generated.

    Hide response attributes Show response attributes object
    • oneTimeToken string Required

      The generated one-time token for authentication

    • isNewUser boolean Required

      Whether this is a new user (registration) or existing user (login)

    • email string Required

      The verified email address from the Google ID Token

  • 204

    No content for OPTIONS preflight requests

  • 400

    Invalid ID Token, unverified email, or other validation errors

  • 403

    Access forbidden, either due to CORS restrictions or feature not enabled

  • 404

    Google connector not found

GET /api/google-one-tap/verify
curl \
 --request GET 'https://[tenant_id].logto.app/api/google-one-tap/verify?idToken=string' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "oneTimeToken": "string",
  "isNewUser": true,
  "email": "string"
}