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.

UiManager

public interface UiManager

An interface for handling the UI.

Nested Class Summary

enum UiManager.ErrorCode Errors that should be handled by the UI. 
interface UiManager.Request An interface that represents a request from the UiManager to UiManager.RequestHandler
interface UiManager.RequestHandler An interface for handling requests from UiManager
class UiManager.SignInWithPasswordRequest Contains information for signing in a user with email and password. 
class UiManager.SignUpWithPasswordRequest Contains information for signing up a new user. 
class UiManager.StartSignInRequest Contains information for initiating a sign in flow. 
class UiManager.VerifyAccountWithIdpRequest Contains information for verifiying a user with previous used identity provider. 
class UiManager.VerifyAccountWithPasswordRequest Contains information for verifying a user with password. 

Public Method Summary

abstract void
abstract void
abstract void
abstract void
showIdpAccountLinking(String email, IdProvider previousIdProvider, IdProvider currentIdProvider)
abstract void
showPasswordAccountLinking(String email, IdProvider currentIdProvider)
abstract void
showPasswordSignIn(String email)
abstract void
showPasswordSignUp(String email)
abstract void

Public Methods

public abstract void dismiss ()

Removes all the UI screens managed by this UiManager.

public abstract void handleError (UiManager.ErrorCode code)

Handles a user recoverable error. For example, if INVALID_PASSWORD happens, the password sign in screen should indicate the password is incorrect and let the user type in again.

Parameters
code the code of the error.

public abstract void setRequestHandler (UiManager.RequestHandler handler)

Sets the UiManager.RequestHandler. It is called when GitkitClient is initialized. The UiManager should call the corresponding handler method in UiManager.RequestHandler once the user has finished the interaction with the UI.

Parameters
handler the handler that handles requests from UiManager.

public abstract void showIdpAccountLinking (String email, IdProvider previousIdProvider, IdProvider currentIdProvider)

Shows the identity provider account linking screen. If the user used to sign in with previousIdProvider and now tries to sign in with currentIdProvider, he/she needs to be prompted to confirm the attempt. Once the user confirms, handle(UiManager.Request) should be called with a UiManager.VerifyAccountWithIdpRequest such that a sign in with the previous identity provider flow is launched to verify the account ownership.

Parameters
email the email address of the account the user tries to sign in.
previousIdProvider the previous identity provider the user used to sign in with.
currentIdProvider the current identity provider the user signs in with.

public abstract void showPasswordAccountLinking (String email, IdProvider currentIdProvider)

Shows the password account linking screen. If the user used to use password to sign in the account specified by email and now tries to sign in with an identity provider, he/she needs to be prompted to type in the password to verify he/she owns the account. Once the password is provided, handle(UiManager.Request) should be called with a UiManager.VerifyAccountWithPasswordRequest to proceed the flow.

Parameters
email the email address of the account the user tries to sign in.
currentIdProvider current identity provider the user signs in with.

public abstract void showPasswordSignIn (String email)

Shows the password sign in screen. It should show a proper UI to let the user type in his/her password for the account specified by email. Once the password is provided and, handle(UiManager.Request) should be called with a UiManager.SignInWithPasswordRequest to proceed the flow.

Parameters
email the email address the user has chosen.

public abstract void showPasswordSignUp (String email)

Shows the create password account screen. It should show a proper UI to let the user provide the password and display name to create a new account. Once such information is provided, handle(UiManager.Request) should be called with a UiManager.SignUpWithPasswordRequest to proceed the flow.

Parameters
email the email address the user has chosen to use.

public abstract void showStartSignIn (GitkitUser.UserProfile lastUserProfile)

Shows the initial sign in screen. It should show a proper UI to let the user choose/type in which account and/or identity provider he/she wants to use to sign in. Once such information is provided, handle(UiManager.Request) should be called with a UiManager.StartSignInRequest to proceed the flow.

Parameters
lastUserProfile the last used user profile.