The newest version of Google Identity Toolkit has been released as Firebase Authentication. It includes upgraded client SDKs, open source UI libraries, session management and integrated email sending service for forgotten password flows.

New projects should use Firebase Authentication. To migrate an existing project from Identity Toolkit to Firebase Authentication, see the migration guide.

GitkitClientBuilder

public class GitkitClientBuilder

Builder for GitkitClient.

Public Methods

public GitkitClientBuilder addScopes (IdProvider idProvider, List<String> scopes)

Specifies extra scopes to request with the given identity provider. If specified, it overrides the value of the meta-data from AndroidManifest.xml. The following example shows the format of the meta-data value.

meta-data name: identitytoolkit.extra_scopes, e.g.,

public GitkitClient build ()

Builds the GitkitClient.

See Also

public GitkitClientBuilder setApiKey (String apiKey)

Specifies the API key used in the app. The API key is required and can be generated in Google developers console. If specified, it overrides the value of the meta-data from AndroidManifest.xml.

meta-data name: identitytoolkit.api_key, e.g.,

public GitkitClientBuilder setCookieName (String cookieName)

Specifies the cookie name for the identitytoolkit IDToken used by web server widget. If specified, it overrides the value of the meta-data from AndroidManifest.xml. If it's not provided through either this setter or the meta-data, the default value gtoken is used.

meta-data name: identitytoolkit.cookie_name, e.g.,

public GitkitClientBuilder setServerCallbackModeQueryName (String modeQueryName)

Specifies the name of the mode query parameter for identitytoolkit web server widget. If specified, it overrides the value of the meta-data from AndroidManifest.xml. If it's not provided through either this setter or the meta-data, the default value mode is used.

meta-data name: identitytoolkit.mode_query_name, e.g.,

public GitkitClientBuilder setServerClientId (String serverClientId)

Specifies the OAuth2 client ID of the web server. The server client ID is required and can be generated in Google developer console. If specified, it overrides the value of the meta-data from AndroidManifest.xml.

meta-data name: identitytoolkit.server_client_id, e.g.,

public GitkitClientBuilder setServerWidgetUrl (String serverWidgetUrl)

Specifies the identitytoolkit web server widget URL. This is usually the redirect URL of the web server OAuth2 client. If specified, it overrides the value of the meta-data from AndroidManifest.xml.

meta-data name: identitytoolkit.server_widget_url, e.g.,

public GitkitClientBuilder setTosUrl (String tosUrl)

Specifies the URL of the Terms of Service. It is used to show a ToS link on the sign up UI. If specified, it overrides the value of the meta-data from AndroidManifest.xml. If it's not provided through either this setter or the meta-data, no ToS link is shown.

meta-data name: identitytoolkit.tos_url, e.g.,

public GitkitClientBuilder setUiManager (UiManager uiManager)

Specifies the UiManager for the GitkitClient. If not specified, the default one is used.

See Also

public GitkitClientBuilder showProviders (IdProvider... idProviders)

Specifies the identity providers that are shown on the sign in UI. If specified, it overrides the value of the meta-data from AndroidManifest.xml.

meta-data name: identitytoolkit.show_providers, e.g.,

public GitkitClientBuilder useGooglePlus (boolean useGooglePlus)

Specifies whether to use Google+ Sign In to authenticate Google user. If specified, it overrides the value of the meta-data from AndroidManifest.xml. If it's not provided through either this setter or the meta-data, the default value true is used.

meta-data name: identitytoolkit.use_google_plus, e.g.,