We need to use email as username during registration.
It means registration form without username field, but value from email field will be used as username internally in Keycloak. I can patch registration for thanks to theme, but username validation and processing is done on server and I can't to change it now.
If user changes email later then username will not be changed.
We need same for Social Registration also - use email address provided by Social Provider as username (
KEYCLOAK-1053 must be resolved for cases like Twitter)
I hoped I'll be able to solve this problem in my UserFederationProvider SPI implementation, but it is not possible unfortunately. Problem is that internal KC user is created before UserFederationProvider.register() is called, so I can't change username in this method.