Skip to content

Commit

Permalink
[#50167] added v2 switch
Browse files Browse the repository at this point in the history
  • Loading branch information
Kharonus committed Oct 19, 2023
1 parent bd7fd4f commit e1522e7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/omniauth/openid_connect/azure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@ def secret
end

def client_options
v2switch = tenant == 'common' ? '' : 'v2.0/'

opts = {
authorization_endpoint: "/#{tenant}/oauth2/v2.0/authorize",
token_endpoint: "/#{tenant}/oauth2/v2.0/token",
authorization_endpoint: "/#{tenant}/oauth2/#{v2switch}authorize",
token_endpoint: "/#{tenant}/oauth2/#{v2switch}token",
userinfo_endpoint: userinfo_endpoint
}

Expand Down

0 comments on commit e1522e7

Please sign in to comment.