lib/gds-sso/warden_config.rb in gds-sso-1.0.0 vs lib/gds-sso/warden_config.rb in gds-sso-1.1.0
- old
+ new
@@ -1,7 +1,14 @@
require 'warden'
require 'gds-sso/user'
+
+Warden::Manager.after_authentication do |user, auth, opts|
+ # We've successfully signed in.
+ # If they were remotely signed out, clear the flag as they're no longer suspended
+ user.clear_remotely_signed_out!
+end
+
Warden::Manager.serialize_into_session do |user|
user.respond_to?(:uid) ? user.uid : nil
end
Warden::Manager.serialize_from_session do |uid|