1

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 3

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.

Sign up to request clarification or add additional context in comments.

3 Comments

can i use the update() mentioned on the pyrebase repo?
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.
there is a signOut function but its promise based, so it's in JavaScript. Is there a similar function in python implementation?
0
user=auth.sign_in_with_email_and_password(email,password)
info = auth.get_account_info(user['idToken'])
displayname = info['users'][0]['displayName']

2 Comments

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.
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?
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

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.