FC ParticulierController: inline fci.user
This commit is contained in:
parent
d348e5fde0
commit
4afc41bca2
1 changed files with 2 additions and 3 deletions
|
@ -14,13 +14,12 @@ class FranceConnect::ParticulierController < ApplicationController
|
|||
.find_by(france_connect_particulier_id: fetched_fci[:france_connect_particulier_id]) ||
|
||||
fetched_fci.tap { |object| object.save }
|
||||
|
||||
user = fci.user
|
||||
salt = FranceConnectSaltService.new(fci).salt
|
||||
|
||||
if user.nil?
|
||||
if fci.user.nil?
|
||||
redirect_to france_connect_particulier_new_path(fci_id: fci.id, salt: salt)
|
||||
else
|
||||
connect_france_connect_particulier(user)
|
||||
connect_france_connect_particulier(fci.user)
|
||||
end
|
||||
rescue Rack::OAuth2::Client::Error => e
|
||||
Rails.logger.error e.message
|
||||
|
|
Loading…
Reference in a new issue