Login with username or email or other attribute

Hello everyone,

I want to authenticate my user with a third attribute.
As i can see, it’s not implemented by default.
Has anyone ever met the need and solved it ?
I didn’t find any discussions about it

Thanks

Can you give an example of a “third attribute”? Do you mean something like a phone number? It is possible to build custom Authenticators in Keycloak to do this. The developer documentation is a good place to start: Server Developer Guide

For exemple employeeNumber and uid. I want to reproduce the Username Or Email authenticator but with extra attributes. I don’t even know how to reproduce this.
Well if I need to dev, it will be a bit difficult.

@xgp Any example can you suggest where authentication can be done using custom attributes apart from regular username and email in keycloak?

It really depends on your exact use case, but there are some examples of using attributes in the user lookup process that may be instructive: GitHub - cnieg/keycloak-login-attribute: Adds the possibility for Keycloak to connect via a user attribute