Merge pull request #10342 from demarches-simplifiees/dirty_fix_to_make_fc_work_again

hack: always use default redirect_uri
This commit is contained in:
LeSim 2024-04-17 09:45:21 +00:00 committed by GitHub
commit 6165df277b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3,9 +3,10 @@ class FranceConnectParticulierClient < OpenIDConnect::Client
config = FRANCE_CONNECT[:particulier]
# TODO: remove this block when migration to new domain is done
if !Rails.env.test? && Current.host != ENV.fetch("APP_HOST")
config[:redirect_uri] = config[:redirect_uri].gsub(ENV.fetch("APP_HOST"), Current.host)
end
# dirty hack to redirect to the right domain
# if !Rails.env.test? && Current.host != ENV.fetch("APP_HOST")
# config[:redirect_uri] = config[:redirect_uri].gsub(ENV.fetch("APP_HOST"), Current.host)
# end
super(config)