public static final class AuthUI.IdpConfig.EmailBuilder extends AuthUI.IdpConfig.Builder
AuthUI.IdpConfig builder for the email provider.| Constructor and Description |
|---|
EmailBuilder() |
| Modifier and Type | Method and Description |
|---|---|
AuthUI.IdpConfig |
build() |
AuthUI.IdpConfig.EmailBuilder |
enableEmailLinkSignIn()
Enables email link sign in instead of password based sign in.
|
AuthUI.IdpConfig.EmailBuilder |
setActionCodeSettings(com.google.firebase.auth.ActionCodeSettings actionCodeSettings)
Sets the
ActionCodeSettings object to be used for email link sign in. |
AuthUI.IdpConfig.EmailBuilder |
setAllowNewAccounts(boolean allow)
Enables or disables creating new accounts in the email sign in flows.
|
AuthUI.IdpConfig.EmailBuilder |
setDefaultEmail(String email)
Sets a default sign in email, if the given email has been registered before, then
it will ask the user for password, if the given email it's not registered, then
it starts signing up the default email.
|
AuthUI.IdpConfig.EmailBuilder |
setForceSameDevice()
Disables allowing email link sign in to occur across different devices.
|
AuthUI.IdpConfig.EmailBuilder |
setRequireName(boolean requireName)
Configures the requirement for the user to enter first and last name in the email
sign up flow.
|
getParams, setProviderId@NonNull public AuthUI.IdpConfig.EmailBuilder setAllowNewAccounts(boolean allow)
Account creation is enabled by default.
@NonNull public AuthUI.IdpConfig.EmailBuilder setRequireName(boolean requireName)
Name is required by default.
@NonNull public AuthUI.IdpConfig.EmailBuilder enableEmailLinkSignIn()
ActionCodeSettings object using
setActionCodeSettings(ActionCodeSettings)
You must enable Firebase Dynamic Links in the Firebase Console to use email link sign in.
IllegalStateException - if ActionCodeSettings is null or not
provided with email link enabled.@NonNull public AuthUI.IdpConfig.EmailBuilder setActionCodeSettings(com.google.firebase.auth.ActionCodeSettings actionCodeSettings)
ActionCodeSettings object to be used for email link sign in.
ActionCodeSettings.canHandleCodeInApp() must be set to true, and a valid
continueUrl must be passed via ActionCodeSettings.Builder#setUrl(String).
This URL must be allowlisted in the Firebase Console.
IllegalStateException - if canHandleCodeInApp is set to falseNullPointerException - if ActionCodeSettings is null@NonNull public AuthUI.IdpConfig.EmailBuilder setForceSameDevice()
This cannot be disabled with anonymous upgrade.
@NonNull public AuthUI.IdpConfig.EmailBuilder setDefaultEmail(String email)
public AuthUI.IdpConfig build()
build in class AuthUI.IdpConfig.Builder