'how do I add displayName to my user using Pyrebase

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?



Solution 1:[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.

Solution 2:[2]

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

Solution 3:[3]

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

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Frank van Puffelen
Solution 2 dave-16
Solution 3 Brunoazzireluto