Package com.firebase.ui.auth
Class AuthUI.IdpConfig.EmailBuilder
- java.lang.Object
-
- com.firebase.ui.auth.AuthUI.IdpConfig.Builder
-
- com.firebase.ui.auth.AuthUI.IdpConfig.EmailBuilder
-
- Enclosing class:
- AuthUI.IdpConfig
public static final class AuthUI.IdpConfig.EmailBuilder extends AuthUI.IdpConfig.Builder
AuthUI.IdpConfigbuilder for the email provider.
-
-
Constructor Summary
Constructors Constructor Description EmailBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AuthUI.IdpConfigbuild()AuthUI.IdpConfig.EmailBuilderenableEmailLinkSignIn()Enables email link sign in instead of password based sign in.AuthUI.IdpConfig.EmailBuildersetActionCodeSettings(com.google.firebase.auth.ActionCodeSettings actionCodeSettings)Sets theActionCodeSettingsobject to be used for email link sign in.AuthUI.IdpConfig.EmailBuildersetAllowNewAccounts(boolean allow)Enables or disables creating new accounts in the email sign in flows.AuthUI.IdpConfig.EmailBuildersetForceSameDevice()Disables allowing email link sign in to occur across different devices.AuthUI.IdpConfig.EmailBuildersetRequireName(boolean requireName)Configures the requirement for the user to enter first and last name in the email sign up flow.-
Methods inherited from class com.firebase.ui.auth.AuthUI.IdpConfig.Builder
getParams, setProviderId
-
-
-
-
Method Detail
-
setAllowNewAccounts
@NonNull public AuthUI.IdpConfig.EmailBuilder setAllowNewAccounts(boolean allow)
Enables or disables creating new accounts in the email sign in flows.Account creation is enabled by default.
-
setRequireName
@NonNull public AuthUI.IdpConfig.EmailBuilder setRequireName(boolean requireName)
Configures the requirement for the user to enter first and last name in the email sign up flow.Name is required by default.
-
enableEmailLinkSignIn
@NonNull public AuthUI.IdpConfig.EmailBuilder enableEmailLinkSignIn()
Enables email link sign in instead of password based sign in. Once enabled, you must pass a validActionCodeSettingsobject usingsetActionCodeSettings(ActionCodeSettings)You must enable Firebase Dynamic Links in the Firebase Console to use email link sign in.
- Throws:
java.lang.IllegalStateException- ifActionCodeSettingsis null or not provided with email link enabled.
-
setActionCodeSettings
@NonNull public AuthUI.IdpConfig.EmailBuilder setActionCodeSettings(com.google.firebase.auth.ActionCodeSettings actionCodeSettings)
Sets theActionCodeSettingsobject to be used for email link sign in.ActionCodeSettings.canHandleCodeInApp()must be set to true, and a valid continueUrl must be passed viaActionCodeSettings.Builder.setUrl(String). This URL must be whitelisted in the Firebase Console.- Throws:
java.lang.IllegalStateException- if canHandleCodeInApp is set to falsejava.lang.NullPointerException- if ActionCodeSettings is null
-
setForceSameDevice
@NonNull public AuthUI.IdpConfig.EmailBuilder setForceSameDevice()
Disables allowing email link sign in to occur across different devices.This cannot be disabled with anonymous upgrade.
-
build
public AuthUI.IdpConfig build()
- Overrides:
buildin classAuthUI.IdpConfig.Builder
-
-