Registration: Email validation fails

Hello everyone!

We set up a Keycloak 9.0.2 environment in our Cordova app, started with some user tests last week and noticed an amount of failed registrations in the event log. They all had one thing in common: a trailing whitespace. Further tests confirm that validation fails because of this.
Now, we’re wondering what the easiest way to trim the email field is and how to get started on that.
Any tips would be very much appreciated!

Have your tried upgrading to a more recent version of Keycloak? 11.0.3 was released not so long ago.

I’ve look through the source code a bit and I don’t see where they trim any white space. It could be they just don’t do it yet or have a reason why.
My suggestion is to create an issue or create a custom provider which does this for you.

1 Like