@@ -, +, @@ secret --- members/two_factor_auth.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/members/two_factor_auth.pl +++ a/members/two_factor_auth.pl @@ -18,6 +18,7 @@ use Modern::Perl; use CGI; +use Convert::Base32 qw( encode_base32 ); use C4::Auth qw( get_template_and_user ); use C4::Output qw( output_and_exit output_html_with_http_headers ); @@ -77,7 +78,7 @@ if ( $op eq 'enable-2FA' ) { my $auth = Koha::Auth::TwoFactorAuth->new( { patron => $logged_in_user } ); - my $secret32 = $auth->generate_secret32; + my $secret32 = encode_base32(Koha::AuthUtils::generate_salt("strong", 32)); my $qr_code_url = $auth->qr_code( $secret32, $auth->key_id, $auth->issuer, ); --