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

BeginSignInRequest.GoogleIdTokenRequestOptions.Builder

public static final class BeginSignInRequest.GoogleIdTokenRequestOptions.Builder extends Object

Public Constructor Summary

Public Method Summary

BeginSignInRequest.GoogleIdTokenRequestOptions
BeginSignInRequest.GoogleIdTokenRequestOptions.Builder
setFilterByAuthorizedAccounts(boolean filterByAuthorizedAccounts)
Sets whether to only allow the user to select from Google accounts that are already authorized to sign in to your application.
BeginSignInRequest.GoogleIdTokenRequestOptions.Builder
setNonce(String nonce)
Sets the nonce to use when generating a Google ID token.
BeginSignInRequest.GoogleIdTokenRequestOptions.Builder
setServerClientId(String serverClientId)
Sets the server's client ID to use as the audience for Google ID tokens generated during the sign-in.
BeginSignInRequest.GoogleIdTokenRequestOptions.Builder
setSupported(boolean supported)
Sets whether Google ID token-backed credentials should be returned by the API.

Inherited Method Summary

Public Constructors

public BeginSignInRequest.GoogleIdTokenRequestOptions.Builder ()

Public Methods

public BeginSignInRequest.GoogleIdTokenRequestOptions.Builder setFilterByAuthorizedAccounts (boolean filterByAuthorizedAccounts)

Sets whether to only allow the user to select from Google accounts that are already authorized to sign in to your application.

If true, the user will not be able to select any Google account that would otherwise require explicit authorization to share basic profile/email data with your application. This may reduce some friction in the sign-in user journey, and guarantees that the returned credential is for a "returning user", but limits the user's freedom to choose among all the Google accounts on the device.

Parameters
filterByAuthorizedAccounts whether to only allow the user to select from Google accounts that are already authorized to sign in to your application

public BeginSignInRequest.GoogleIdTokenRequestOptions.Builder setNonce (String nonce)

Sets the nonce to use when generating a Google ID token.

Parameters
nonce the nonce to use during ID token generation

public BeginSignInRequest.GoogleIdTokenRequestOptions.Builder setServerClientId (String serverClientId)

Sets the server's client ID to use as the audience for Google ID tokens generated during the sign-in.

Parameters
serverClientId the client ID of the server to which the ID token will be issued

public BeginSignInRequest.GoogleIdTokenRequestOptions.Builder setSupported (boolean supported)

Sets whether Google ID token-backed credentials should be returned by the API.

Parameters
supported whether Google ID token-backed credentials should be returned