
Handle the result of the password save flow in onActivityResult: void onActivityResult(int requestCode, int resultCode, Intent data) else if (resultCode = Activity. Result.getPendingIntent().getIntentSender(), Identity.getCredentialSavingClient and launch the flow: Identity.getCredentialSavingClient(activity) Get a PendingIntent to display the password save dialog from SavePasswordRequest.builder().setSignInPassword(signInPassword).build() SignInPassword signInPassword = new SignInPassword(userId, password) Ĭreate a SavePasswordRequest object SavePasswordRequest savePasswordRequest = private static final int REQUEST_CODE_GIS_SAVE_PASSWORD = 2 /* unique request id */ Id they use with your service (for example their username or email address)Īnd password that you want to save. After you have confirmed the credentials are valid, launch theĬreate a new SignInPassword object. Keep the credentials in memory whileĪuthenticating. You should launch the password save dialog after you have authenticated the In these situations, the best practice is to prepare for cases where the Activity is re-created by properly saving and restoring the state. When you start the save password flow, the user will be presented with aīottomsheet dialog allowing them to choose if they want to save their passwordĪnd to which Google account they want to save it. The user will be able to sign in with their saved To enable One Tap sign-in for returning users, you can prompt users to save
