I am using Pyrebase in order to work with Firebase on my project.
I have been able to successfully create a user using email and password.
The user object has a field called displayName
. How do I enter a value in this at the time of creation?
Asked
Active
Viewed 520 times
1

ag2byte
- 191
- 3
- 11
3 Answers
1
From what I can see in the Auth
implementation of the repo, it does not provide functionality to set the user's display name.
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. I recommend filing a feature request on the Github repo.

Frank van Puffelen
- 565,676
- 79
- 828
- 807
-
can i use the update() mentioned on the pyrebase repo? – ag2byte Mar 17 '21 at 17:34
-
It would really help if you provide a link to the documentation you mean (similarly to the links I provide above to code/APIs I talk about). But if you're asking about [this method](https://github.com/thisbejim/Pyrebase#update), then that is about updating the database, not updating a user's profile in Firebase Authentication. – Frank van Puffelen Mar 17 '21 at 20:13
-
there is a ```signOut``` function but its promise based, so it's in JavaScript. Is there a similar function in python implementation? – ag2byte Mar 18 '21 at 13:29
0
user=auth.sign_in_with_email_and_password(email,password)
info = auth.get_account_info(user['idToken'])
displayname = info['users'][0]['displayName']

dave-16
- 11
- 3
-
1Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jan 01 '22 at 01:05
-
1Remember that Stack Overflow isn't just intended to solve the immediate problem, but also to help future readers find solutions to similar problems, which requires understanding the underlying code. This is especially important for members of our community who are beginners, and not familiar with the syntax. Given that, **can you [edit] your answer to include an explanation of what you're doing** and why you believe it is the best approach? – Jeremy Caney Jan 03 '22 at 00:44
0
I'm building an api in Flask using firebase authentication, I'm using the libs firebase_admim and pyrebase. use firebase admin auth method in this way:
auth.create_user(email=email, password=password, display_name=name)
so you can set the display name when creating users

Brunoazzireluto
- 1
- 1