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

SignInClient

public interface SignInClient implements HasApiKey<SignInOptions>

A client for the sign-in API.

Public Method Summary

abstract Task<BeginSignInResult>
beginSignIn(BeginSignInRequest signInRequest)
Initiates the retrieval of a credential that can assist the caller in signing a user in to their application.
abstract SignInCredential
getSignInCredentialFromIntent(Intent data)
Retrieves the SignInCredential from the Intent returned upon successful sign-in, throwing an ApiException if no credential is present.
abstract Task<Void>
signOut()
Resets internal state related to sign-in.

Inherited Method Summary

Public Methods

public abstract Task<BeginSignInResult> beginSignIn (BeginSignInRequest signInRequest)

Initiates the retrieval of a credential that can assist the caller in signing a user in to their application.

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

Parameters
signInRequest configuration for the sign-in operation
Returns
  • Task which eventually contains the result of the initialization

public abstract SignInCredential getSignInCredentialFromIntent (Intent data)

Retrieves the SignInCredential from the Intent returned upon successful sign-in, throwing an ApiException if no credential is present.

Throws
ApiException

public abstract Task<Void> signOut ()

Resets internal state related to sign-in.

This method should be invoked when a user signs out of your app.

Returns
  • Task which eventually terminates in success or failure