Skip to content

Commit

Permalink
fix(okta): Fix okta auth url (#2647)
Browse files Browse the repository at this point in the history
- Remove `default` in okta oauth url
  • Loading branch information
jdenquin authored Oct 2, 2024
1 parent abaf8c9 commit a119605
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/services/auth/okta/base_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ def query_okta_access_token
redirect_uri: "#{ENV["LAGO_FRONT_URL"]}/auth/okta/callback"
}

token_client = LagoHttpClient::Client.new("https://#{result.okta_integration.organization_name.downcase}.okta.com/oauth2/default/v1/token")
token_client = LagoHttpClient::Client.new("https://#{result.okta_integration.organization_name.downcase}.okta.com/oauth2/v1/token")
response = token_client.post_url_encoded(params, {})
result.okta_access_token = response['access_token']
end

def check_userinfo(email)
userinfo_client = LagoHttpClient::Client.new("https://#{result.okta_integration.organization_name.downcase}.okta.com/oauth2/default/v1/userinfo")
userinfo_client = LagoHttpClient::Client.new("https://#{result.okta_integration.organization_name.downcase}.okta.com/oauth2/v1/userinfo")
userinfo_headers = {'Authorization' => "Bearer #{result.okta_access_token}"}
response = userinfo_client.get(headers: userinfo_headers)

Expand Down

0 comments on commit a119605

Please sign in to comment.