One Tap creates assisted sign in and sign up UIs which will augment your existing flows with a popup that lets your users authenticate frictionlessly. It does not replace your existing sign in or sign up flows, but helps you optimize the experience for users that choose to use the One Tap overlay.

One Tap augments your existing sign in or sign up flows

One Tap supports

Signing in to an existing account with your service using their Google account or saved passwords

with your service using their Google account or saved passwords Signing up for a new account with your service using their Google account (federated login)

It ships with com.google.android.gms:play-services-auth version 18.0.0 .

One Tap and Google Identity Services

One Tap is part of a new suite of libraries currently in development called Google Identity Services. Google Identity Services will eventually incorporate the full feature set of the Smart Lock for Passwords and Google Sign-In libraries, as well as introduce new features. The Google Sign-In library lets you sign in with Google accounts (just like One Tap) as well as offering additional features such as the Google Sign-In button and the ability to request additional permissions. However, this is a work in progress and the first version does not yet implement the full feature set of these libraries.

Google Identity Services will eventually unify both the Google Sign-In and Smart Lock for Passwords for Android developers

One Tap is the first feature of Google Identity Service that we’re launching and it’s ready for use in applications today to optimize sign in and sign up flows. We’ll be working on adding the other features provided by the Google Sign-In and Smart Lock for Passwords libraries. These features include the ability to save passwords, sign in with the Google Sign-In button, request permissions to access user data such as drive content, perform auto and silent sign in using Google Sign-In, save idp credentials, and lookup phone numbers for autofill flows. We hope to launch many of these features in Google Identity Services later this year.

Compared to the existing Google Sign-In and Smart Lock for Passwords UIs, we have found that users are more likely to successfully sign in with the One Tap UI. Also, they’re more likely to choose the correct account when logging back in — which helps them get into your app, avoids creating duplicate accounts, and cuts down on support requests. The web version of this UI, which launched previously, has led to a 2x increase in conversions for some websites.

For existing apps, our recommendation is to evaluate adding One Tap to augment your existing sign in and sign up flows when it makes sense for your application and team (you don’t need to do it right away).

Applications that need features of Google Sign-In or Smart Lock for Passwords that are not yet available can use both libraries today to add One Tap on top of existing flows, or wait for support to be added later this year.

For new applications, we recommend using One Tap to create optimized sign in and sign up experiences.

One Tap does not replace the Google Sign-In button, but augments your app’s existing sign in and sign up flows. You can use One Tap in an application that has a Google Sign-In button to create an assisted sign in or sign up flow in addition to your existing button.

Assisted sign in with One Tap

Assisted sign in with One Tap shows an overlay to the user prompting them to re-sign in with a previously authorized account. The user must have signed in previously in order for it to be presented as a “sign in” option.

Warning: You must implement sign up with One Tap to cover a case when a user doesn’t have a previously authorized account. If you only implement sign in you’ll not show an overlay to users who haven’t used your app or service before.

One Tap sign in is triggered by your code. Depending on your app, this may be triggered when the app first launches, or later when the user attempts to perform a guarded action.

Once you’ve decided to start the sign in process, you can query to see if any accounts are available for sign in by calling beginSignIn on a SignInClient . For sign in flows, it’s important that you configure the sign in with setFilterByAuthorizedAccounts(true) to only return previously authorized (or signed in) accounts. You can read more in the docs.

The callback from beginSignIn will pass a PendingIntent that displays the overlay when launched. Then you call startIntentSenderForResult with the provided PendingIntent to display the modal login popup over the current activity.

Use the PendingIntent provided by the SignInClient to overlay the current Activity with a One Tap login dialog.

One Tap can overlay on top of any Activity in your application

The One Tap dialog can be displayed anywhere in your application. So, you can let the user get started using your app before asking them to sign in. This lets you build an optimized login flow for your application. Wherever you call startIntentSenderForResult , One Tap will overlay on top of that Activity .

The result of the prompt is returned using onActivityResult

The user then signs in using One Tap, or cancels the prompt. Either way, the result is sent to onActivityResult . You use the same client to parse the result and either get a federated login (Google Sign-In), or a password. Then continue the login process as you normally would with your backend.

Assisted sign up with One Tap

If One Tap doesn’t find any authorized accounts for sign in, beginSignIn will call the failure listener instead of passing your application a PendingIntent . When this happens, you should repeat the query but this time look for accounts that can be used to sign up.

This time configure One Tap with setFilterByAuthorizedAccounts(false) and it will query for any valid accounts that could be used to sign up, as well as any accounts that were previously authorized. If any are found, you’ll get back a PendingIntent that you can use to show a sign up overlay. When prompted to sign up the user will be asked to give consent for sharing email and profile permissions.

To recap, here’s the overall flow for a One Tap overlay.