Firebase身份验证标识符从Facebook登录名中存储什么值如果用户未通过电子邮件注册 [英] What value does Firebase Auth Identifier store from Facebook Login If user is not registered with email

查看:79
本文介绍了Firebase身份验证标识符从Facebook登录名中存储什么值如果用户未通过电子邮件注册的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Firebase Auth Identifier从Facebook登录名存储什么值如果用户不是通过电子邮件注册的,而是通过电话号码注册的.我的应用程序提供了Facebook登录名,但是现在当用户继续使用Facebook登录名时,我的Firebase身份验证将电子邮件地址存储为标识符,但是当有人通过Facebook登录名登录了我的应用程序并在Facebook中注册了电话号码时,我的Firebase身份验证就存储了标识符中的空值.因此,我该怎么做才能将来自Facebook的用户的电话号码存储为identofier或将Facebook id存储为标识符,例如id_abcd@facebook.com

What value does Firebase Auth Identifier store from Facebook Login If user is not registered with email but with Phone Number. My app provides facebook login but now when a user is carrying on with Facebook login my firebase auth stores the email address as an Identifiers but when someone login in my app via facebook login who had registered with phone number in facebook then my firebase auth is storing null value in Identifier. So what should I do to store a user's phone number from facebook as an identofier or facebook id as an identifier e.g id_abcd@facebook.com

推荐答案

Firebase Auth后端将使用相应的Facebook ID来标识该用户.您可以从currentUser中的providerData列表中获取Facebook ID.将有一个条目,其uid是Facebook ID.因此,没有空标识符.只有电子邮件为空.

Firebase Auth backend will use the corresponding Facebook ID to identify that user. You can get the Facebook ID from the providerData list in the currentUser. There will be an entry whose uid is the Facebook ID. So there is no null identifier. Only the email is null.

如果您想自己为该用户设置电子邮件,也可以使用updateEmail API.

You can also use updateEmail API if you want to set the email yourself on that user.

这篇关于Firebase身份验证标识符从Facebook登录名中存储什么值如果用户未通过电子邮件注册的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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