I trigger the firebaseUI phone number authentication on a button click. How to bind the country code (which user has selected in the field country in the form, i.e when user has selected the country i want that country to be displayed/bind it in firebaseUI phone number auth dialog)
I trigger the firebaseUI phone number authentication on a button click. How to bind the country code (which user has selected in the field country in the form, i.e when user has selected the country i want that country to be displayed/bind it in firebaseUI phone number auth dialog)
Share Improve this question asked Jan 23, 2019 at 10:27 deedee 211 silver badge3 bronze badges1 Answer
Reset to default 10Refer to the documentation for configuring phone auth with FirebaseUI: https://github./firebase/firebaseui-web#configure-phone-provider
You have the ability to set the default selected country via defaultCountry
configuration field, eg:
ui.start('#firebaseui-auth-container', {
signInOptions: [
{
provider: firebase.auth.PhoneAuthProvider.PROVIDER_ID,
// The default selected country.
defaultCountry: 'GB'
}
]
});