sign_out all devise account when user initialize a FranceConnect connection

This commit is contained in:
Xavier J 2016-01-26 16:48:33 +01:00
parent 008ca19bef
commit c461d58297

View file

@ -1,4 +1,5 @@
class FranceConnect::ParticulierController < ApplicationController
def login
client = FranceConnectParticulierClient.new
@ -94,6 +95,10 @@ class FranceConnect::ParticulierController < ApplicationController
private
def connect_france_connect_particulier user
sign_out :user if user_signed_in?
sign_out :gestionnaire if gestionnaire_signed_in?
sign_out :administrateur if administrateur_signed_in?
sign_in user
user.loged_in_with_france_connect = 'particulier'