最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - how to change country code in firebaseUI auth web - Stack Overflow

programmeradmin6浏览0评论

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 badges
Add a ment  | 

1 Answer 1

Reset to default 10

Refer 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'
    }
  ]
});
发布评论

评论列表(0)

  1. 暂无评论