-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Description
Before reporting an issue
- I have read and understood the above terms for submitting issues, and I understand that my issue may be closed without action if I do not follow them.
Area
admin/ui
Describe the bug
If you set the "email as username" realm option, you can turn on "edit username" but it does not work. You cannot update your username.
Version
25.0.0
Regression
- The issue is a regression
Expected behavior
I have a use case where the users are required to have a verified email, but optionally they can choose to also setup a separate username. If the username is setup it should be available for use during login, of course they can also always use their email during login.
Actual behavior
If I turn off the "email as username" option, it seems this make me setup a unique username for every user, one that is not their email.
How to Reproduce?
You can view this behavior in the admin UI. Be toggling the options and then trying to create and update users.... it also affects the APIs as I get "Bad Request" if I don't provide both email and username when the "email as username" option is off and I cannot set the username to the email as a workaround. If I have email as username turned on, the api ignores my username updates.
Anything else?
I think one possible implementation is to allow "email as username" to be set and have it set the username to the email address if a separate username is not provided. Then if "edit username" is turned on, it should allow you to modify the email address to something other than the email.