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:
        java.lang.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 whitelisted in the Firebase Console.

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