By: Shaun Walker named 26 Sep 2022 at 6:31 p.m. CDT

3 Responses
Shaun Walker gravatar
Hi Team, I am aware that we currently have a primary identifier that is set as the UID. We have a number of applications that we are looking at shifting to Gluu that currently have a mix of authentication types: email, username, etc. Is it possible to allow users to authenticate with a username or an email address if they desire? If so, how would we set the email field to be indexed with unique constraints as well to support this? Cheers, Shaun

By Mobarak Hosen Shakil staff 26 Sep 2022 at 7:12 p.m. CDT

Mobarak Hosen Shakil gravatar
Hi, Shaun! Yes, you can use multi-attributes-based login. For example, you can use `uid and email` as the login attributes. So user can login through either `username` or email whatever they prefer to use. To get this feature, you have to use Custom authentication script. You will find details here: [https://github.com/GluuFederation/oxAuth/tree/master/Server/integrations/basic.multi_login](https://github.com/GluuFederation/oxAuth/tree/master/Server/integrations/basic.multi_login) > Is it possible to allow users to authenticate with a username or an email address if they desire? You have to enable `enforceEmailUniqueness` attribute in `JSON Configuration > oxTrust Configuration`. > If so, how would we set the email field to be indexed with unique constraints as well to support this? Regards ~ Shakil

By Mobarak Hosen Shakil staff 02 Oct 2022 at 11:50 p.m. CDT

Mobarak Hosen Shakil gravatar
Hi, Shaun! Please let us know if you still need any assistance. Thanks.

By Mobarak Hosen Shakil staff 09 Oct 2022 at 5:36 p.m. CDT

Mobarak Hosen Shakil gravatar
Closing this ticket, please reopen if requires.