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?
3 Answers
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.
3 Comments
ag2byte
can i use the update() mentioned on the pyrebase repo?
Frank van Puffelen
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, then that is about updating the database, not updating a user's profile in Firebase Authentication.
ag2byte
there is a
signOut function but its promise based, so it's in JavaScript. Is there a similar function in python implementation?user=auth.sign_in_with_email_and_password(email,password)
info = auth.get_account_info(user['idToken'])
displayname = info['users'][0]['displayName']
2 Comments
Community
Your 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.
Jeremy Caney
Remember 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?