Class AuthUI.IdpConfig.PhoneBuilder

    • Constructor Detail

      • PhoneBuilder

        public PhoneBuilder()
    • Method Detail

      • setDefaultNumber

        @NonNull
        public AuthUI.IdpConfig.PhoneBuilder setDefaultNumber​(@NonNull
                                                              java.lang.String iso,
                                                              @NonNull
                                                              java.lang.String number)
        Set the default phone number that will be used to populate the phone verification sign-in flow.
        Parameters:
        iso - the phone number's country code
        number - the phone number in local format
      • setDefaultCountryIso

        @NonNull
        public AuthUI.IdpConfig.PhoneBuilder setDefaultCountryIso​(@NonNull
                                                                  java.lang.String iso)
        Set the default country code that will be used in the phone verification sign-in flow.
        Parameters:
        iso - country iso
      • setWhitelistedCountries

        public AuthUI.IdpConfig.PhoneBuilder setWhitelistedCountries​(@NonNull
                                                                     java.util.List<java.lang.String> whitelistedCountries)
        Sets the country codes available in the country code selector for phone authentication. Takes as input a List of both country isos and codes. This is not to be called with setBlacklistedCountries(List). If both are called, an exception will be thrown.

        Inputting an e-164 country code (e.g. '+1') will include all countries with +1 as its code. Example input: {'+52', 'us'} For a list of country iso or codes, see Alpha-2 isos here: https://en.wikipedia.org/wiki/ISO_3166-1 and e-164 codes here: https://en.wikipedia.org/wiki/List_of_country_calling_codes

        Parameters:
        whitelistedCountries - a non empty case insensitive list of country codes and/or isos to be whitelisted
        Throws:
        java.lang.IllegalArgumentException - if an empty whitelist is provided.
        java.lang.NullPointerException - if a null whitelist is provided.
      • setBlacklistedCountries

        public AuthUI.IdpConfig.PhoneBuilder setBlacklistedCountries​(@NonNull
                                                                     java.util.List<java.lang.String> blacklistedCountries)
        Sets the countries to be removed from the country code selector for phone authentication. Takes as input a List of both country isos and codes. This is not to be called with setWhitelistedCountries(List). If both are called, an exception will be thrown.

        Inputting an e-164 country code (e.g. '+1') will include all countries with +1 as its code. Example input: {'+52', 'us'} For a list of country iso or codes, see Alpha-2 codes here: https://en.wikipedia.org/wiki/ISO_3166-1 and e-164 codes here: https://en.wikipedia.org/wiki/List_of_country_calling_codes

        Parameters:
        blacklistedCountries - a non empty case insensitive list of country codes and/or isos to be blacklisted
        Throws:
        java.lang.IllegalArgumentException - if an empty blacklist is provided.
        java.lang.NullPointerException - if a null blacklist is provided.