How to enable email login in kolibri

I have a scenario where thousands of users have email id in the username column who have to use kolibri. I used kolibri openID connect plugin to mitigate this process. the userinfo token has username, email and other details which is passed to kolibri. I cannot pass email ids as username as a validation error is raised.

Is there a way to use email as login in kolibri and to prioritise emailid for kolibri login in OIDC callback? can i avoid dealing with username validation error for lot of users if i go with this approach.

Has anybody tried this approach. please guide me in resolving this.

Hi there,

My understanding is that email for sign in should work in these circumstances. To better understand your situation and provide accurate guidance, could you please provide us with some additional details? Specifically:

  1. Could you kindly let us know which OpenID Connect provider you are using for your setup? Along with this, as much detail about your specific environment as possible would be very helpful.

  2. Additionally, could you specify the version of the Kolibri OpenID Connect plugin you are utilizing? Email capability was introduced in a later version (2020). More information about the email integration can be found in this pull request, if you’re interested.

  3. It would be extremely helpful if you could share the logs from Kolibri, especially any error messages that you encounter. Also, please provide the version of Kolibri you are using, as this will help us replicate your environment accurately.

  4. Could you provide details about the configuration in your options.ini file? This will enable us to better understand your setup.

  5. Lastly, can you tell us what specific validation errors you’re seeing? Screenshots or Copy/Pasting of the message would be fine here.

Looking forward to your response!

Best regards,
David

@david @blaine @laura @Weblearning

  • We have got lots of users using their email address as username for their desktop learning softwares. we have the data stored in keycloak. kolibri oidc client plugin was used to access KOLIBRI from keycloak. But the problem is there are already tens of thousands of users having emailids as username in keycloak. But in kolibri, a validation error is raised that special characters are not allowed i.e., @, when a emailID in username field is passed to kolibri in the usertoken.

  • Other issue is kolibri allows only username and password for login. we only have data of full name and their emailIDs. we cant set the usernames on the users behalf as they are blind. Is there any documentation to have emailID field and Password field for login???

Versions:

  1. Kolibri - v0.15.5
  2. kolibri-oidc-client-plugin- (v0.3.1 - latest)
  3. keycloak - v17.0.1 (released in 2022)

Hi @Uday_Kiran,

We have been discussing this internally, and there is currently a restriction in the backend that is causing this blockage for you.

We have created an issue to track resolution of this, which we hope to complete in time for release with 0.16.0 which should be released within a month or so.

Thank you for giving us these details, and clearly outlining the needs and use case you have in mind, it really helps us to prioritize these sorts of requests.

I will try to follow up here when the issue has been resolved and the new release has happened.

Kind Regards,
Richard

Hi @Uday_Kiran, following up on the last comment from @richard, the implementation to use email addresses as usernames is now fully complete in both Kolibri and the Kolibri OIDC client plugin.

A new version, 0.3.2, of the plugin has just been released on PyPI (kolibri-oidc-client-plugin · PyPI), and the necessary code in Kolibri has already been merged (Email like usernames disallowed in all circumstances · Issue #11351 · learningequality/kolibri · GitHub). It will be available in the next beta release of Kolibri 0.16. Please note that the last release available on Releases · learningequality/kolibri · GitHub is beta 6, which is approximately one month old and does not include the mentioned changes.

Once the next release of Kolibri is available, please let us know if you encounter any issues related to this topic.

Regards,
José