From 4adfb64ba01a170cb1f77e8f86d4d0ec4eb3fe07 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Mon, 12 Sep 2022 09:02:21 +0000 Subject: [PATCH] Bug 30588: (QA follow-up) Clear waiting-for-2FA-setup in session Content-Type: text/plain; charset=utf-8 If we do not clear this session, the first login directly after setup does not really enhances user experience ;) Test plan: Make sure 2FA is enforced. Test the above. Disable your 2FA, logout and login. Verify that you can access pages with this patch now. Without this patch you could not. Run these tests to provide more confidence: t/db_dependent/Auth.t t/db_dependent/api/v1/two_factor_auth.t t/db_dependent/Koha/Auth/TwoFactorAuth.t Signed-off-by: Marcel de Rooy --- C4/Auth.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/C4/Auth.pm b/C4/Auth.pm index 5ca5fa0b1e..f5a1ae2e08 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -919,6 +919,7 @@ sub checkauth { # The token is correct, the user is fully logged in! $auth_state = 'completed'; $session->param( 'waiting-for-2FA', 0 ); + $session->param( 'waiting-for-2FA-setup', 0 ); # This is an ugly trick to pass the test # $query->param('koha_login_context') && ( $q_userid ne $userid ) -- 2.20.1