-
public final class AuthUIThe entry point to the AuthUI authentication flow, and related utility methods. If your application uses the default FirebaseApp instance, an AuthUI instance can be retrieved simply by calling getInstance. If an alternative app instance is in use, call getInstance instead, passing the appropriate app instance.
See the READMEfor examples on how to get started with FirebaseUI Auth.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public @interfaceAuthUI.SupportedProviderpublic final classAuthUI.IdpConfigConfiguration for an identity provider.
public final classAuthUI.SignInIntentBuilderBuilder for the intent to start the user authentication flow.
-
Field Summary
Fields Modifier and Type Field Description public final static StringTAGpublic final static StringANONYMOUS_PROVIDERpublic final static StringEMAIL_LINK_PROVIDERpublic final static StringMICROSOFT_PROVIDERpublic final static StringYAHOO_PROVIDERpublic final static StringAPPLE_PROVIDERpublic final static intNO_LOGOpublic final static Set<String>SUPPORTED_PROVIDERSpublic final static Set<String>SUPPORTED_OAUTH_PROVIDERSpublic final static Set<String>SOCIAL_PROVIDERSpublic final static StringUNCONFIGURED_CONFIG_VALUE
-
Method Summary
Modifier and Type Method Description static ContextgetApplicationContext()static voidsetApplicationContext(@NonNull() Context context)static AuthUIgetInstance()Retrieves the AuthUI instance associated with the default app, as returned by {@code * FirebaseApp.getInstance()}.static AuthUIgetInstance(@NonNull() String appName)Retrieves the AuthUI instance associated the the specified app name. static AuthUIgetInstance(@NonNull() FirebaseApp app)Retrieves the AuthUI instance associated the the specified app. FirebaseAppgetApp()FirebaseAuthgetAuth()static booleancanHandleIntent(@NonNull() Intent intent)Returns true if AuthUI can handle the intent. static intgetDefaultTheme()Default theme used by setTheme if no theme customization isrequired. Task<Void>signOut(@NonNull() Context context)Signs the current user out, if one is signed in. Task<Void>delete(@NonNull() Context context)Delete the user from FirebaseAuth. voiduseEmulator(@NonNull() String host, int port)Connect to the Firebase Authentication emulator. booleanisUseEmulator()StringgetEmulatorHost()intgetEmulatorPort()AuthUI.SignInIntentBuildercreateSignInIntentBuilder()Starts the process of creating a sign in intent, with the mandatory application contextparameter. -
-
Method Detail
-
getApplicationContext
@RestrictTo(value = RestrictTo.Scope.LIBRARY_GROUP)@NonNull() static Context getApplicationContext()
-
setApplicationContext
@RestrictTo(value = RestrictTo.Scope.LIBRARY_GROUP) static void setApplicationContext(@NonNull() Context context)
-
getInstance
@NonNull() static AuthUI getInstance()
Retrieves the AuthUI instance associated with the default app, as returned by
{@code * FirebaseApp.getInstance()}.
-
getInstance
@NonNull() static AuthUI getInstance(@NonNull() String appName)
Retrieves the AuthUI instance associated the the specified app name.
-
getInstance
@NonNull() static AuthUI getInstance(@NonNull() FirebaseApp app)
Retrieves the AuthUI instance associated the the specified app.
-
getApp
@NonNull()@RestrictTo(value = RestrictTo.Scope.LIBRARY_GROUP) FirebaseApp getApp()
-
getAuth
@NonNull()@RestrictTo(value = RestrictTo.Scope.LIBRARY_GROUP) FirebaseAuth getAuth()
-
canHandleIntent
static boolean canHandleIntent(@NonNull() Intent intent)
Returns true if AuthUI can handle the intent.
AuthUI handle the intent when the embedded data is an email link. If it is, you can thenspecify the link in setEmailLink before starting AuthUIand it will be handled immediately.
-
getDefaultTheme
@StyleRes() static int getDefaultTheme()
Default theme used by setTheme if no theme customization isrequired.
-
signOut
@NonNull() Task<Void> signOut(@NonNull() Context context)
Signs the current user out, if one is signed in.
- Parameters:
context- the context requesting the user be signed out
-
delete
@NonNull() Task<Void> delete(@NonNull() Context context)
Delete the user from FirebaseAuth.
Any associated saved credentials are not explicitly deleted with the new APIs.
- Parameters:
context- the calling Context.
-
useEmulator
void useEmulator(@NonNull() String host, int port)
Connect to the Firebase Authentication emulator.
-
isUseEmulator
@RestrictTo(value = RestrictTo.Scope.LIBRARY_GROUP) boolean isUseEmulator()
-
getEmulatorHost
@RestrictTo(value = RestrictTo.Scope.LIBRARY_GROUP) String getEmulatorHost()
-
getEmulatorPort
@RestrictTo(value = RestrictTo.Scope.LIBRARY_GROUP) int getEmulatorPort()
-
createSignInIntentBuilder
@NonNull() AuthUI.SignInIntentBuilder createSignInIntentBuilder()
Starts the process of creating a sign in intent, with the mandatory application contextparameter.
-
-
-
-