We are discontinuing the Google Sign-In JavaScript Platform Library for web. The library will be unavailable for download after the March 31, 2023 deprecation date. Instead, use the new Google Identity Services for Web.
By default, newly created Client IDs are now blocked from using the older Platform Library, existing Client IDs are unaffected. New Client IDs created before July 29th, 2022 can set `plugin_name` to enable use of the Google Platform Library.

Cross-platform single sign-in

Stay organized with collections Save and categorize content based on your preferences.

When a user signs in with their Google account in a web browser or on an Android device, they can be seamlessly signed in across web browsers and Android devices using the same Google account. This feature allows users to get the best experience out of multiple devices by making it easier for them to sign in to your service.

When the button is loaded on the web, it immediately checks to see if the user has authorized the application. This check is called "immediate mode" and if successful, the Google servers return an access token and pass a new authorization result object to the callback. If the button cannot make an immediate-mode authorization, the user must click the sign-in button to trigger the access flow.

To enable cross-platform single sign-on:

  1. The Android and web app must be registered in the same Google API Console project.
  2. The requested scopes on each platform must match the scopes from other platforms.

Cross-platform single sign-on works for the user when the following requirements are met:

  1. The user is signed in to Google in the browser or on the Android device.
  2. The user has previously authorized your app for the same scopes.

This experience is similar to when a user opens an Android app the second time. If the user previously authorized the app, then the user remains signed in: users do not click the sign-in button every time they open the app.

When a user is seamlessly signed in, Google displays a reminder that they are logged in using their Google account. This reminder only appears once per device.