config/initializers/devise.rb in iugusdk-1.0.0.alpha.1 vs config/initializers/devise.rb in iugusdk-1.0.0.alpha.2
- old
+ new
@@ -225,18 +225,5 @@
# manager.intercept_401 = false
# manager.default_strategies(:scope => :user).unshift :some_external_strategy
# end
end
-
-Warden::Manager.after_authentication do |record,auth,opts|
- if record && record.respond_to?(:accounts)
- include IuguSDK::Controllers::Helpers
- cookie_name = 'account'
- account = record.default_account( auth.cookies['last_' + cookie_name + '_id'] )
- if account
- auth.cookies['last_' + cookie_name.downcase + '_id'] = { :value => account.id, :expires => 365.days.from_now }
- auth.env['rack.session'][ 'current_' + cookie_name.downcase + '_id' ] = account.id
- end
- end
-end
-