Closed anvarik closed 1 year ago
FirebaseUI is unlikely to support username / password until it is supported in the underlying firebase-auth
library. You will need to build that on your own. I have seen multiple approaches online for this.
signInWithEmailAndPassword
.username@my-project-id.firebaseapp.com
and then call signInWithEmailAndPassword
. The downside is that there will not be a recovery email for the user.You can learn more about this on stackoverflow. In general, I don't recommend usernames as you will always need to ask the user for their email for recovery purposes (if you forget your password with username sign-in then your account is lost) and to verify identities if needed. So you will end up asking the user for both a username and an email.
The explanation given has no sense. There are lot of applications that manages users login with both alternatives at the same time, username or email login.
We have a use case of migrating WordPress users to Firebase. WordPress both support authentication with email and username, but Firebase just offers emails, which can be a "deal-breaker".
We don’t support this out of the box because 1. it would be more susceptible to abuse than using, for example, a trusted email provider or any of the OAuth2 providers and 2. the password recovery flow would be broken without an email for each user.
If you really need only usernames, could probably implement this using signInWithCustomToken
, but make sure you have a solution for the two problems above.
This is not something FirebaseUI can support unless it is implemented in the underlying product, Firebase Authentication. To file a feature request for Firebase Authentication, please post here: https://firebase.uservoice.com/forums/948424-general?category_id=464875
It's been years and still, Firebase won't support username authentication... Any chance to consider this at some point?
In the interim what would be a good and secure approach to pass usernames along with Firebase's email authentication?
First & Last Name
prompt to be a username. I did manage to change the label, but then again I want unique usernames across my app so I need validations on that, also can't see where first/last names are actually stored in Firebase. When I check the Authentication tab only emails and uids are displayed. Did anyone manage to tweak the ui code to support usernames?requireDisplayName: false
and then let the user register with email and password and then redirect for a page where the user enters a username. But not sure whether that's good user experience.createUserWithEmailAndPassword
and add 3 inputs, and in callbacks update my newusers
collection to store uids that I retrieve from auth along with the usernames that are entered.I feel like if we can configure the display name and change the label without modifying firebaseui code, and can enforce the display name to be unique that would solve my problem. I just wanted to get some feedback on what community thinks about these options, any examples are welcome.