Google is committed to advancing racial equity for Black communities. See how.

CredentialSavingClient

public interface CredentialSavingClient implements HasApiKey<CredentialSavingOptions>

A client for the Credential Saving API.

The Credential Saving APIs can be used to save credentials. The only type of credential that is currently supported by this API is a pair of username/password.

The Credential Saving APIs guide the user through the Google account selection before saving a credential. The recommended process for saving a credential using this API is as follows:

  1. Get a new API client instance by calling Identity.getCredentialSavingClient.
  2. Call CredentialSavingClient.savePassword, supplying the constructed SavePasswordRequest as an input.
  3. If the request is successful, launch the PendingIntent from the result of the operation to display the UI that guides the user through the flow of saving password. The success or failure result will be returned in Activity.onActivityResult.

Public Method Summary

abstract Task<SavePasswordResult>
savePassword(SavePasswordRequest savePasswordRequest)
Initiates the storage of a password-backed credential that can later be used to sign a user in.

Inherited Method Summary

Public Methods

public abstract Task<SavePasswordResult> savePassword (SavePasswordRequest savePasswordRequest)

Initiates the storage of a password-backed credential that can later be used to sign a user in.

If the request cannot be honored, an exception will be set on the returned Task. In all other cases, a SavePasswordResult will be returned.

Parameters
savePasswordRequest container for the SignInPassword for the password-saving flow
Returns
  • Task which eventually contains the result of the initialization