fusionauth-issues icon indicating copy to clipboard operation
fusionauth-issues copied to clipboard

Feature: Add 'Email' and 'Username' to application's registration fields

Open gmpreussner opened this issue 5 years ago • 14 comments

Add 'Username' to registration fields

Problem

I have some applications that require an email address for registration, others require a username. There is also one (Tuleap) that doesn't work without providing both email and username. Currently, FusionAuth requires only one or the other via the 'Login Type' Self Service Registration settings.

Solution

Add 'Email' and 'Username' to the 'Registration fields'. If enabled, for login type 'Email' it should also show a 'Username' field, and for login type 'Username' it should also show an 'Email' field. If the external IdP does not provide a value for either one, the UI should request these values from the user. The values should then be forwarded to the application via the 'email' and/or 'profile' scopes.

Alternatives/workarounds

I have not tried this yet, but I think a viable workaround would be to:

  1. Set login type to 'Email'
  2. Require 'Full Name', or 'First / Middle / Last Name'
  3. Use an 'Id Token Populate' lambda to derive a username from the real name
  4. Inject the username into the JWT response

The downside of this is that the user may not be able to change the username later to the preferred value, unless the application allows for overriding it (some do).

Additional context

I have both self-registration in FusionAuth and registration via external IdP enabled. I'm using FusionAuth as the only registration/login method for my applications.

How to vote

Please give us a thumbs up or thumbs down as a reaction to help us prioritize this feature. Feel free to comment if you have a particular need or comment on how this feature should work.

gmpreussner avatar Jun 15 '19 14:06 gmpreussner