Lines 18-23
Link Here
|
18 |
use Modern::Perl; |
18 |
use Modern::Perl; |
19 |
|
19 |
|
20 |
use CGI; |
20 |
use CGI; |
|
|
21 |
use Convert::Base32 qw( encode_base32 ); |
21 |
|
22 |
|
22 |
use C4::Auth qw( get_template_and_user ); |
23 |
use C4::Auth qw( get_template_and_user ); |
23 |
use C4::Output qw( output_and_exit output_html_with_http_headers ); |
24 |
use C4::Output qw( output_and_exit output_html_with_http_headers ); |
Lines 77-83
if ( $op eq 'enable-2FA' ) {
Link Here
|
77 |
my $auth = Koha::Auth::TwoFactorAuth->new( |
78 |
my $auth = Koha::Auth::TwoFactorAuth->new( |
78 |
{ patron => $logged_in_user } ); |
79 |
{ patron => $logged_in_user } ); |
79 |
|
80 |
|
80 |
my $secret32 = $auth->generate_secret32; |
81 |
my $secret32 = encode_base32(Koha::AuthUtils::generate_salt("strong", 32)); |
81 |
my $qr_code_url = |
82 |
my $qr_code_url = |
82 |
$auth->qr_code( $secret32, $auth->key_id, $auth->issuer, ); |
83 |
$auth->qr_code( $secret32, $auth->key_id, $auth->issuer, ); |
83 |
|
84 |
|
84 |
- |
|
|