Added support for authenticating the same username in different subdomains #9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
[ Note that this is related to pull request : https://github.com/omniauth/pull/39 Specifically I would be interested in merging this commit https://github.com/commodo/omniauth-ldap/commit/2dfe16d0445d3115d05ba838c5976fe431a713a6 ; the initial fork started from https://github.com/intridea/omniauth-ldap but I am more interested in getting this into Gitlab ]
In case you have a company domain like DC=example,DC=com
And you have multiple subdomains (US, EMEA, AU, etc), and the (company) policy is to define the same username in all subdomains (example user1), then there is a problem when it comes to authenticating user1.
So, a quick fix is to add a user format like subdomain\username, for example
All you have to do, is to add your base DN as DC=example,DC=com and whenever a user tries to login, he can use the subdomain as a prefix.
This is only needed when the the same username is present in more subdomains.
Otherwise, this works as before.