firebase-tools
firebase-tools copied to clipboard
Not disable emulator authentication edit user.
[REQUIRED] Environment info
firebase-tools: 11.4
Platform: macOS
[REQUIRED] Test case
After run firebase emulators:start
,
Edit Authentication Edit User
If then not enable SAVE
button.
[REQUIRED] Steps to reproduce
- use v11 firebase-tools
-
firebase emulators:start
- Goto Authentication
- Goto
Edit User
- Press
Save
button
[REQUIRED] Expected behavior
Enable Save.
Can work for v10.8.0 and v10.9.0. Currently, using this version to this issue. (Screenshot is from v10.)
[REQUIRED] Actual behavior
Disable Save.
This issue does not have all the information required by the template. Looks like you forgot to fill out some sections. Please update the issue with more information.
The latest emulator does not consider the form to be valid until the user has a password, even though it is valid for a user to not have a password via a range of login methods.
Eg:
Hey @nitaking, thanks for filing this issue, this is working as intended. Digging into this a bit more: To clarify, saving a user with an email but without a password is an invalid state. In earlier versions of Firebase Emulator UI, e.g. firebase-tools v10.8 or v10.9, this invalid state would display an error message when you would first add that user.

However, for editing a user, the "Save" button was enabled when it wouldn't necessarily do anything. The following is a recording of what would happen on v10.8 if you edited a user that had email+password and tried to remove the password. Notice that even if you tried to save the user without the password, it would still be present if you inspected the user again.
https://user-images.githubusercontent.com/14339917/191853893-ea1f0cf8-2e8d-41a3-b303-6df3971b5983.mov
The newer versions, e.g. v11.4 and later, disables the "Save" button to prevent states that shouldn't be saved, such as saving an email/password user without the password, which is what you're encountering.
https://user-images.githubusercontent.com/14339917/191854098-11f6a6a7-3314-4c98-ad9d-a5508ef74500.mov
@KoryNunn, thanks for the follow up - this is also working as intended. You can still add users without either email/password or phone number. However, to do so, you would have to call one of the SDK methods to create the user or one of the emulated endpoints. You would not be able to create those users through the Emulator UI, though; this is similar to how you may be able to create new email/password users in the Firebase Console, but not anonymous users.
As an example, the following is a screenshot of a new auth user that was created from calling signInAnonymously
from a test app and then inspecting the Emulator UI:

I'm going to close out this issue, but if you have any questions, please feel free to follow up on this thread or open a new issue if it's separate from this discussion
Should we not still be able to edit claims, display names, etc. without then having to provide password/auth details (this follow-up question specifically targets email-link sign-up/in) in order to click save within the emulator UI?