omniauth-azure-oauth2
omniauth-azure-oauth2 copied to clipboard
Azure v2 Support
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.
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.
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.