lib/gds-sso/controller_methods.rb in gds-sso-1.0.0 vs lib/gds-sso/controller_methods.rb in gds-sso-1.1.0

- old
+ new

@@ -29,9 +29,13 @@ headers["X-Slimmer-Skip"] = "1" # If slimmer used, without this you would see a generic 400 error page render "authorisations/cant_signin", layout: "unauthorised", status: :forbidden end def authenticate_user! + if current_user && current_user.remotely_signed_out? + message = "You have been remotely signed out." + render "authorisations/unauthorised", layout: "unauthorised", status: :forbidden, locals: { message: message } + end warden.authenticate! end def user_signed_in? warden.authenticated?