omniauth-azure-oauth2 icon indicating copy to clipboard operation
omniauth-azure-oauth2 copied to clipboard

Azure v2 Support

Open achawkins opened this issue 4 years ago • 2 comments

This adds support for the Azure v2 endpoints. My use case is for GitLab and this works when I manually change the lib file. I have added corresponding tests.

I have also added an optional change to the claim used for a unique ID. When using the sub claim (which is the most sensible for most cases) it fails to authenticate the same user because the sub is different between the two versions. I use the oid claim in GitLab and change the user's provider identifier to be this value, which is available in AAD.

Note: I am not very familiar with Ruby so it is likely I have not followed best practices for the (very little) code I added. Please let me know if I should change anything.

achawkins avatar Jun 08 '20 15:06 achawkins

Thanks for contributing. However, I no longer have time to maintain this gem. Your best bet is to fork it and consider publishing to RubyGems so others can benefit.

marknadig avatar Jul 23 '20 16:07 marknadig

For anyone thats looking for this we have published a v2 compatible gem based on this no longer maintained project here:

  • https://rubygems.org/gems/omniauth-azure-activedirectory-v2
  • https://github.com/RIPGlobal/omniauth-azure-activedirectory-v2

Actively maintained and lots of usage now.

whithajess avatar Feb 26 '21 01:02 whithajess