This class is deprecated.
Instead, use SignInClient
and CredentialSavingClient
.
Entry point for requesting a credential and indicating whether sign-in was successful using the credential.
Public Method Summary
Task<Void> |
delete(Credential
credential)
This method is deprecated. Unlike other APIs in
CredentialsClient , this feature will NOT be supported in the new SDK
and this API will be removed. In the future, end-users should delete their
credentials in Chrome browser instead.
|
Task<Void> |
disableAutoSignIn()
This method is deprecated. When
SignInClient.beginSignIn(BeginSignInRequest) is used to replace
request(CredentialRequest) , use
SignInClient.signOut() to disable Auto Sign-in instead.
|
PendingIntent |
getHintPickerIntent(HintRequest
request)
This method is deprecated. Instead, use
SignInClient.getPhoneNumberHintIntent(GetPhoneNumberHintIntentRequest)
to retrieve phone number hints. Other types of hints are no longer
supported.
|
Task<CredentialRequestResponse> |
request(CredentialRequest
request)
This method is deprecated. Instead, use
SignInClient.beginSignIn(BeginSignInRequest) .
|
Task<Void> |
save(Credential
credential)
This method is deprecated. Instead, use
CredentialSavingClient.savePassword(SavePasswordRequest) .
|
Inherited Method Summary
Public Methods
public Task<Void> delete (Credential credential)
This method is deprecated.
Unlike other APIs in CredentialsClient
,
this feature will NOT be supported in the new SDK and this API will be removed. In the
future, end-users should delete their credentials in Chrome browser instead.
Deletes a credential that is no longer valid for signing into the app.
public Task<Void> disableAutoSignIn ()
This method is deprecated.
When
SignInClient.beginSignIn(BeginSignInRequest)
is used to replace
request(CredentialRequest)
, use
SignInClient.signOut()
to disable Auto Sign-in instead.
Disables auto sign-in for the calling app on the current device only, until a
successful call to
save(Credential)
is subsequently made. This is intended to be called when a
user logs out of the app, to prevent a possible auto sign-in loop if the app's activity
immediately calls the
request(CredentialRequest)
method in its login activity.
public PendingIntent getHintPickerIntent (HintRequest request)
This method is deprecated.
Instead, use
SignInClient.getPhoneNumberHintIntent(GetPhoneNumberHintIntentRequest)
to
retrieve phone number hints. Other types of hints are no longer supported.
Provides an intent to directly display the hint picker to the user, to aid in new account creation.
WARNING: The identifier string of the credential returned by the hint picker should
be treated as unverified. Do not accept plain user IDs for authentication -- they have
not been verified and could be spoofed. If a Json Web Token is available
(Credential.getIdTokens()
)
on the object returned from this request, it may contain a claim that the identifier
has been verified by Google and this token can be passed to your backend server for
validation and used for verification purposes.
public Task<CredentialRequestResponse> request (CredentialRequest request)
This method is deprecated.
Instead, use
SignInClient.beginSignIn(BeginSignInRequest)
.
Tries to suggest a zero-click sign-in account. Only call this if your app does not currently know who is signed in.
public Task<Void> save (Credential credential)
This method is deprecated.
Instead, use
CredentialSavingClient.savePassword(SavePasswordRequest)
.
Saves a credential that was used to sign in to the app. If
disableAutoSignIn()
was previously called and the save operation succeeds,
auto sign-in will be re-enabled if the user's settings permit this.
Note: On Android O and above devices save requests that require showing a save
confirmation may be cancelled in favor of the active Autofill service's save dialog.
This behavior may be overridden by using
Auth.AuthCredentialsOptions.Builder.forceEnableSaveDialog()
. Please see the
overview
documentation
for more details on providing the best user experience when
targeting Android O and above.