From 554a956a8b9e3e36d71f3c4f53708560e7d492f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jozef=20Steinh=C3=BCbl?= Date: Sun, 13 Oct 2024 19:05:27 +0200 Subject: [PATCH] fix: logout on callback error --- config/initializers/omniauth.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/initializers/omniauth.rb b/config/initializers/omniauth.rb index c0c9e6817..6c110fd11 100644 --- a/config/initializers/omniauth.rb +++ b/config/initializers/omniauth.rb @@ -8,6 +8,10 @@ # Respond to saml, saml/callback, saml/metadata, saml/slo, and saml/spslo under path prefix. config.path_prefix = '/auth' + config.on_failure do |env| + SessionsController.action(:destroy).call(env) + end + # Use default application logger. config.logger = Rails.logger end