From f04fb3830c6d2a2c4df674bcd9b9b5a5b10e4481 Mon Sep 17 00:00:00 2001 From: Pierre de La Morinerie Date: Wed, 8 Jan 2020 10:42:31 +0000 Subject: [PATCH] config: fix France Connect callback URL when testing locally MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When testing France Connect on a local development environment, the callback URL should be something like `http://localhost:3000/…/…` But currently, the callback URL uses `https`, even in development. This causes the callback URL to be rejected by France Connect. This commit overrides the callback URL when in development, to use an `http` URL instead. In doesn't affect the production settings. --- config/secrets.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/config/secrets.yml b/config/secrets.yml index e2ad309a6..3d7ffa9af 100644 --- a/config/secrets.yml +++ b/config/secrets.yml @@ -15,7 +15,7 @@ defaults: &defaults basic_auth: username: <%= ENV['BASIC_AUTH_USERNAME'] %> password: <%= ENV['BASIC_AUTH_PASSWORD'] %> - france_connect_particulier: + france_connect_particulier: &france_connect_particulier identifier: <%= ENV['FC_PARTICULIER_ID'] %> secret: <%= ENV['FC_PARTICULIER_SECRET'] %> redirect_uri: https://<%= ENV['APP_HOST'] %>/france_connect/particulier/callback @@ -76,6 +76,10 @@ defaults: &defaults development: <<: *defaults + france_connect_particulier: + <<: *france_connect_particulier + redirect_uri: http://<%= ENV['APP_HOST'] %>/france_connect/particulier/callback + test: <<: *defaults