简体   繁体   English

如何在firebaseUI身份验证网站中更改国家/地区代码

[英]how to change country code in firebaseUI auth web

I trigger the firebaseUI phone number authentication on a button click. 单击按钮后触发firebaseUI电话号码身份验证。 How to bind the country code (which user has selected in the field country in the form, ie when user has selected the country i want that country to be displayed/bind it in firebaseUI phone number auth dialog) 如何绑定国家/地区代码(该用户在表格中的国家/地区中选择了哪个用户,即当用户选择了国家/地区后,我希望该国家/地区在firebaseUI电话号码身份验证对话框中显示/绑定)

Refer to the documentation for configuring phone auth with FirebaseUI: https://github.com/firebase/firebaseui-web#configure-phone-provider 请参阅用于使用FirebaseUI配置电话身份验证的文档: https : //github.com/firebase/firebaseui-web#configure-phone-provider

You have the ability to set the default selected country via defaultCountry configuration field, eg: 您可以通过defaultCountry配置字段设置默认的所选国家/地区,例如:

ui.start('#firebaseui-auth-container', {
  signInOptions: [
    {
      provider: firebase.auth.PhoneAuthProvider.PROVIDER_ID,
      // The default selected country.
      defaultCountry: 'GB'
    }
  ]
});

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM