From ca4ab4cfe1735f0b17f734e026e3cc62c5d1f91b Mon Sep 17 00:00:00 2001 From: simon lehericey Date: Wed, 17 Apr 2024 15:33:37 +0200 Subject: [PATCH] fix: multi FC do not change const --- app/models/france_connect_particulier_client.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/models/france_connect_particulier_client.rb b/app/models/france_connect_particulier_client.rb index b87afc5e5..6c8248f8d 100644 --- a/app/models/france_connect_particulier_client.rb +++ b/app/models/france_connect_particulier_client.rb @@ -1,12 +1,12 @@ class FranceConnectParticulierClient < OpenIDConnect::Client def initialize(code = nil) - config = FRANCE_CONNECT[:particulier] + config = FRANCE_CONNECT[:particulier].deep_dup # TODO: remove this block when migration to new domain is done # 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 + 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)