Merge pull request #3851 from betagouv/fix-fc-callback
Correction d'une erreur rare lors du login France Connect
This commit is contained in:
commit
97fcbe88a4
2 changed files with 7 additions and 1 deletions
|
@ -30,7 +30,7 @@ class FranceConnect::ParticulierController < ApplicationController
|
|||
private
|
||||
|
||||
def redirect_to_login_if_fc_aborted
|
||||
if params[:code].empty?
|
||||
if params[:code].blank?
|
||||
redirect_to new_user_session_path
|
||||
end
|
||||
end
|
||||
|
|
|
@ -25,6 +25,12 @@ describe FranceConnect::ParticulierController, type: :controller do
|
|||
|
||||
subject { get :callback, params: { code: code } }
|
||||
|
||||
context 'when params are missing' do
|
||||
subject { get :callback }
|
||||
|
||||
it { is_expected.to redirect_to(new_user_session_path) }
|
||||
end
|
||||
|
||||
context 'when param code is missing' do
|
||||
let(:code) { nil }
|
||||
|
||||
|
|
Loading…
Reference in a new issue