Class AuthUI.IdpConfig.PhoneBuilder

    • Constructor Detail

      • PhoneBuilder

        public PhoneBuilder()
    • Method Detail

      • setDefaultNumber

        @NonNull
        public AuthUI.IdpConfig.PhoneBuilder setDefaultNumber​(@NonNull
                                                              String iso,
                                                              @NonNull
                                                              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
                                                                  String iso)
        Set the default country code that will be used in the phone verification sign-in flow.
        Parameters:
        iso - country iso
      • setAllowedCountries

        public AuthUI.IdpConfig.PhoneBuilder setAllowedCountries​(@NonNull
                                                                 List<String> countries)
        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 setBlockedCountries(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:
        countries - a non empty case insensitive list of country codes and/or isos to be allowlisted
        Throws:
        IllegalArgumentException - if an empty allowlist is provided.
        NullPointerException - if a null allowlist is provided.
      • setBlockedCountries

        public AuthUI.IdpConfig.PhoneBuilder setBlockedCountries​(@NonNull
                                                                 List<String> countries)
        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 setAllowedCountries(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:
        countries - a non empty case insensitive list of country codes and/or isos to be blocklisted
        Throws:
        IllegalArgumentException - if an empty blocklist is provided.
        NullPointerException - if a null blocklist is provided.