Class AuthUI.IdpConfig.EmailBuilder

    • Constructor Detail

      • EmailBuilder

        public EmailBuilder()
    • 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 valid ActionCodeSettings object using setActionCodeSettings(ActionCodeSettings)

        You must enable Firebase Dynamic Links in the Firebase Console to use email link sign in.

        Throws:
        IllegalStateException - if ActionCodeSettings is null or not provided with email link enabled.
      • setActionCodeSettings

        @NonNull
        public AuthUI.IdpConfig.EmailBuilder setActionCodeSettings​(com.google.firebase.auth.ActionCodeSettings actionCodeSettings)
        Sets the 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.

        Throws:
        IllegalStateException - if canHandleCodeInApp is set to false
        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.

      • setDefaultEmail

        @NonNull
        public 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.