【问题标题】:How can I use Firebase Phone Authentication without having the UID be the phone number?如何在不将 UID 作为电话号码的情况下使用 Firebase 电话身份验证?
【发布时间】:2017-05-29 01:02:29
【问题描述】:

根据官方文档,一旦用户被创建,UID就是电话号码本身。

https://firebase.google.com/docs/auth/ios/phone-auth#sign-in-the-user-with-the-verification-code

这似乎不太安全,因为我们经常在应用程序的许多其他字段中使用user.uid

【问题讨论】:

    标签: firebase firebase-authentication


    【解决方案1】:

    实际上,user.uid 将由 Firebase 身份验证后端配置为一些长的随机字母数字字符串。但是,电话身份验证提供商的 providerData 条目将电话号码作为 uid:user.providerData[phoneProviderIndex].uid === 标准化电话号码。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-01-28
      • 1970-01-01
      • 1970-01-01
      • 2018-05-13
      相关资源
      最近更新 更多