gpt4 book ai didi

Firebase - 用户没有显示名称

转载 作者:行者123 更新时间:2023-12-04 05:36:51 25 4
gpt4 key购买 nike

我可以在 Firebase 控制台 -> Auth 中添加用户,但我只能为他们设置电子邮件和密码。

我可以以某种方式为他们设置 displayName 吗?

最佳答案

我想如果您只想更新用户个人资料:

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 - 用户没有显示名称,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38227139/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com