-
public final class AuthUI.IdpConfig.PhoneBuilder extends AuthUI.IdpConfig.Builder
IdpConfig builder for the phone provider.
-
-
Constructor Summary
Constructors Constructor Description AuthUI.IdpConfig.PhoneBuilder()
-
Method Summary
Modifier and Type Method Description AuthUI.IdpConfig.PhoneBuildersetDefaultNumber(@NonNull() String number)AuthUI.IdpConfig.PhoneBuildersetDefaultNumber(@NonNull() String iso, @NonNull() String number)Set the default phone number that will be used to populate the phone verificationsign-in flow. AuthUI.IdpConfig.PhoneBuildersetDefaultCountryIso(@NonNull() String iso)Set the default country code that will be used in the phone verification sign-inflow. AuthUI.IdpConfig.PhoneBuildersetAllowedCountries(@NonNull() List<String> countries)Sets the country codes available in the country code selector for phoneauthentication. AuthUI.IdpConfig.PhoneBuildersetBlockedCountries(@NonNull() List<String> countries)Sets the countries to be removed from the country code selector for phoneauthentication. AuthUI.IdpConfigbuild()-
-
Method Detail
-
setDefaultNumber
@NonNull() AuthUI.IdpConfig.PhoneBuilder setDefaultNumber(@NonNull() String number)
- Parameters:
number- the phone number in international format
-
setDefaultNumber
@NonNull() AuthUI.IdpConfig.PhoneBuilder setDefaultNumber(@NonNull() String iso, @NonNull() String number)
Set the default phone number that will be used to populate the phone verificationsign-in flow.
- Parameters:
iso- the phone number's country codenumber- the phone number in local format
-
setDefaultCountryIso
@NonNull() AuthUI.IdpConfig.PhoneBuilder setDefaultCountryIso(@NonNull() String iso)
Set the default country code that will be used in the phone verification sign-inflow.
- Parameters:
iso- country iso
-
setAllowedCountries
AuthUI.IdpConfig.PhoneBuilder setAllowedCountries(@NonNull() List<String> countries)
Sets the country codes available in the country code selector for phoneauthentication. Takes as input a List of both country isos and codes.This is not to be called with setBlockedCountries.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-1and e-164 codes here: https://en.wikipedia.org/wiki/List_of_country_calling_codes
- Parameters:
countries- a non empty case insensitive list of country codesand/or isos to be allowlisted
-
setBlockedCountries
AuthUI.IdpConfig.PhoneBuilder setBlockedCountries(@NonNull() List<String> countries)
Sets the countries to be removed from the country code selector for phoneauthentication. Takes as input a List of both country isos and codes.This is not to be called with setAllowedCountries.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-1and e-164 codes here: https://en.wikipedia.org/wiki/List_of_country_calling_codes
- Parameters:
countries- a non empty case insensitive list of country codesand/or isos to be blocklisted
-
build
AuthUI.IdpConfig build()
-
-
-
-