From 24278c287f018f674bb98e358905d3b33c0e0462 Mon Sep 17 00:00:00 2001 From: Alex Kriuchykhin Date: Fri, 2 Feb 2024 12:06:22 +0100 Subject: [PATCH] Fix sign in with OpenID Connect with disabled discovery [SCI-9578] (#7046) --- config/initializers/omniauth.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/config/initializers/omniauth.rb b/config/initializers/omniauth.rb index 7beca1549..da22ac831 100644 --- a/config/initializers/omniauth.rb +++ b/config/initializers/omniauth.rb @@ -44,9 +44,11 @@ OPENID_CONNECT_SETUP_PROC = lambda do |env| } unless provider_conf['discovery'] - client_options[:authorize_url] = provider_conf['authorize_url'] if provider_conf['authorize_url'] - client_options[:token_url] = provider_conf['token_url'] if provider_conf['token_url'] - client_options[:user_info_url] = provider_conf['authorize_url'] if provider_conf['user_info_url'] + client_options[:host] = provider_conf['host'] + client_options[:authorization_endpoint] = provider_conf['authorization_endpoint'] + client_options[:token_endpoint] = provider_conf['token_endpoint'] + client_options[:userinfo_endpoint] = provider_conf['userinfo_endpoint'] + client_options[:jwks_uri] = provider_conf['jwks_uri'] end env['omniauth.strategy'].options[:name] = 'openid_connect'