Skip to content

Commit

Permalink
Merge pull request #10 from opf/bug/50167-internal-server-error-upon-…
Browse files Browse the repository at this point in the history
…login-via-microsoft-entra-id

[#50167] changed azure client opts to use v2 endpoints
  • Loading branch information
machisuji authored Oct 20, 2023
2 parents 7559f44 + 215d614 commit c7e2498
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ spec/reports
test/tmp
test/version_tmp
tmp
.idea/
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
v2_switch = tenant == 'common' ? '' : 'v2.0/'

opts = {
authorization_endpoint: "/#{tenant}/oauth2/authorize",
token_endpoint: "/#{tenant}/oauth2/token",
authorization_endpoint: "/#{tenant}/oauth2/#{v2_switch}authorize",
token_endpoint: "/#{tenant}/oauth2/#{v2_switch}token",
userinfo_endpoint: userinfo_endpoint
}

Expand Down

0 comments on commit c7e2498

Please sign in to comment.