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:
- The Android and web app must be registered in the same Google API Console project.
- 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:
- The user is signed in to Google in the browser or on the Android device.
- 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 don't 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.