Firebase - 没有用户的显示名称 [英] Firebase - no displayName for user
本文介绍了Firebase - 没有用户的显示名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我可以在Firebase控制台中添加用户 - > Auth,但是除了设置电子邮件地址和密码之外,我无能为力。
I can add users in Firebase console -> Auth but I can't do anything more than setting an email and password for them.
我可以通过某种方式为他们设置displayName?
Could I in some way set for them displayName?
推荐答案
我猜如果你只是想更新用户配置文件:
I guess if you just want to update users profile:
firebase.auth().onAuthStateChanged(function(user) {
if (user) {
// User is signed in.
user.updateProfile({
displayName: "Random Name"
}).then(function() {
// Update successful.
}, function(error) {
// An error happened.
});
} else {
// No user is signed in.
}
});
另外: https://firebase.google.com/docs/auth/web/manage-users
这篇关于Firebase - 没有用户的显示名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文