如何更改Android Firebase身份验证中的登录电话号码? [英] How to change the Signed in Phone Number in Firebase Authentication for Android?

查看:167
本文介绍了如何更改Android Firebase身份验证中的登录电话号码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Android Firebase Auth Ui 用于在Android应用中提供基于电话号码的登录选项.我正在尝试提供一种其他选项来登录用户,以将其登录电话号码切换为保留相同用户帐户的另一个电话号码.

I am using Android Firebase Auth Ui for providing Phone Number based sign in option in an android app. I am trying to provide an additional option to signed in users to switch their signed in phone number to another number keeping the same user account.

但是根据电话号码的Firebase文档,没有任何选项更改登录号.

But as per Firebase Docs for Phone number there are no options to change the signed in number.

有用于将不同的身份验证提供程序(例如电子邮件,google或Facebook登录名等)链接到同一帐户的选项.但是没有提及如何更改电话号码或电子邮件ID保持相同用户ID的方法.

There are options for linking different auth providers like email, google or Facebook login etc to same account. But there is no way mentioned about how to change the phone number or email id keeping the same user id.

是否有解决方法或方法可以实现?

Is there a workaround or method by which we can achieve this?

推荐答案

存在用于更新当前用户电话号码的API:

An API exists for updating the phone number of a current user: https://firebase.google.com/docs/reference/android/com/google/firebase/auth/FirebaseUser.html#updatePhoneNumber(com.google.firebase.auth.PhoneAuthCredential)

这篇关于如何更改Android Firebase身份验证中的登录电话号码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆