Documentation Index
Fetch the complete documentation index at: https://mintlify.com/MomenSherif/react-oauth/llms.txt
Use this file to discover all available pages before exploring further.
GoogleLogin renders the official Sign In With Google button using the Google Identity Services SDK. It handles the full credential flow and calls your onSuccess callback with a signed JWT credential. You can optionally enable One Tap sign-in by passing the useOneTap prop.
Usage
If you are using popup mode (the default), set the
Cross-Origin-Opener-Policy header to same-origin-allow-popups to avoid blank window issues.Props
Required
Callback fired with the credential response after a successful sign-in.
Button appearance
The button type.
standard renders a full button with text; icon renders only the Google logo.The button text. For example,
signin_with renders “Sign in with Google”.Google logo alignment within the button.
Callback fired when the Sign in with Google button is clicked.
Callbacks
Callback fired after a login failure.
Callback for PromptMomentNotification events. Use this to observe when the One Tap prompt is displayed, skipped, or dismissed.
Additional props spread onto the
<div> container element that wraps the rendered button. Useful for adding custom className, style, event listeners, or accessibility attributes to the button wrapper.One Tap
When
true, activates One Tap sign-in in addition to rendering the button.Controls whether the One Tap prompt is cancelled when the user clicks outside of it.
Enables automatic credential selection on Google One Tap when only one Google account is available.
The DOM element ID of the container in which to render the One Tap prompt.
Allows the browser to control user sign-in prompts and mediate the sign-in flow using the FedCM API.
Enables the FedCM Button flow.
Sign-in configuration
The UX flow for the Sign In With Google button. Defaults to
popup.The URL of your login endpoint. Required when
ux_mode is redirect.The URL of your password credential handler endpoint.
JavaScript password credential handler function, called when a user signs in with a saved password credential.
A random string embedded in the ID token. Use this to prevent replay attacks.
An opaque string returned with the ID token.
Sets the title and wording displayed in the One Tap prompt.
Pass the parent domain here to share a single state cookie between the parent domain and its subdomains when calling One Tap.
Origins allowed to embed the intermediate iframe. When present, One Tap runs in intermediate iframe mode.
Overrides the default intermediate iframe behavior when the user manually closes One Tap.
Enables the upgraded One Tap UX on Intelligent Tracking Prevention (ITP) browsers.
Hint to Google indicating which Google Workspace domain the user belongs to. See the
hd field in the OpenID Connect docs.CredentialResponse type
The object passed toonSuccess:
The signed JWT ID token. Decode this on your server to verify the user’s identity.
How the credential was selected. Possible values:
auto, user, user_1tap, user_2tap, btn, btn_confirm, btn_add_session, btn_confirm_add_session.The OAuth client ID used for this sign-in.

