cooperlyt / keycloak-phone-provider

A Keycloak provider for phone and SMS
MIT License
286 stars 159 forks source link

Login impossible for federated users #58

Closed mapidentity closed 1 year ago

mapidentity commented 1 year ago

Upon entering a valid code and clicking login an sql exception gets thrown, Value too long for column "BY_WHOM". This prevents the user from successful login. This is caused by the column BY_WHOM being 36 characters which is enough to store a UUID, but federated users have a format that exceeds this length. The storage id for these users consist of "f:" + component id + ":" + external id. The component id here is the UUID of the configured provider (36 characters), which by definition makes this too small. See also Keycloak's documentation about storage ids.

Increasing the width of this column fixes this issue. I propose a length of at least (admittedly arbitrary) 80 characters.