From 810f247b055112a78c5ab5c2f278b465d27bcbd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Janko=20Marohni=C4=87?= Date: Thu, 4 Apr 2024 21:23:43 +0200 Subject: [PATCH] Skip default session clearing in JWT mode --- lib/rodauth/features/jwt.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/rodauth/features/jwt.rb b/lib/rodauth/features/jwt.rb index 070875ef..85f246ee 100644 --- a/lib/rodauth/features/jwt.rb +++ b/lib/rodauth/features/jwt.rb @@ -59,11 +59,9 @@ def session end def clear_session - super - if use_jwt? - session.clear - set_jwt - end + return super unless use_jwt? + session.clear + set_jwt end def jwt_secret