简体   繁体   English

如何使用 Pyrebase 将 displayName 添加到我的用户

[英]how do I add displayName to my user using Pyrebase

I am using Pyrebase in order to work with Firebase on my project.我正在使用 Pyrebase 以便在我的项目中使用 Firebase。 I have been able to successfully create a user using email and password.我已经能够使用 email 和密码成功创建用户。 The user object has a field called displayName .用户 object 有一个名为displayName的字段。 How do I enter a value in this at the time of creation?创建时如何在其中输入值?

From what I can see in the Auth implementation of the repo, it does not provide functionality to set the user's display name.从我在 repo 的Auth实现中可以看到,它不提供设置用户显示名称的功能。

The underlying REST API that Pyrebase is built on does have a method to set the user's account info (including their display name), so it would be possible to include this in Pyrebase. Pyrebase 所基于的底层 REST API确实具有设置用户帐户信息(包括他们的显示名称)的方法,因此可以将其包含在 Pyrebase 中。 I recommend filing a feature request on the Github repo.我建议在 Github 存储库上提交功能请求。

user=auth.sign_in_with_email_and_password(email,password)
info = auth.get_account_info(user['idToken'])
displayname = info['users'][0]['displayName']

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Django 和 Pyrebase:我如何知道我的 email 是否在 firebase 中得到验证 - Django & Pyrebase: How do I know if my email is verified or not in firebase 如何使用 pyrebase 删除用户帐户? - how to delete a user account using pyrebase? 如何防止用户在不登录我使用 Flask 和 Pyrebase4 开发的应用程序的情况下访问 session? - How can I prevent the user from accessing a session without logging in to my application developed with Flask and Pyrebase4? 如何使用 django 在我的用户应用程序中添加新朋友拒绝和删除朋友的功能? - how do I the functionality of add new friends reject and delete friend in my user app using django? 如何知道用户是否已在Pyrebase和Flask中登录? - How to know whether user is logged in or not in Pyrebase and Flask? 如何使用用户输入向我的 csv 文件添加新行 - How do I add a new line to my csv file using user inputs 如何将现有角色添加到服务器中的用户? - How do I add an existing role to a user in my server? 如何使用 python pyrebase 创建用户帐户并为每个用户存储单独的数据? - how to make user accounts and store separate data for each of them using python pyrebase? 如何使用pyrebase在python中计算firebase数据库? - How to count firebase database in python using pyrebase? 如何使用 Python 对 Pyrebase 执行应用程序检查? - How to perform app check with Pyrebase using Python?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM