Lines 883-889
sub checkauth {
Link Here
|
883 |
{ |
883 |
{ |
884 |
my $patron = Koha::Patrons->find( { userid => $userid } ); |
884 |
my $patron = Koha::Patrons->find( { userid => $userid } ); |
885 |
my $auth = Koha::Auth::TwoFactorAuth->new( { patron => $patron } ); |
885 |
my $auth = Koha::Auth::TwoFactorAuth->new( { patron => $patron } ); |
886 |
my $verified = $auth->verify($otp_token, 1); |
886 |
my $mfa_range = C4::Context->config('mfa_range') ? int(C4::Context->config('mfa_range')) : 1; |
|
|
887 |
my $verified = $auth->verify($otp_token, $mfa_range); |
887 |
$auth->clear; |
888 |
$auth->clear; |
888 |
if ( $verified ) { |
889 |
if ( $verified ) { |
889 |
# The token is correct, the user is fully logged in! |
890 |
# The token is correct, the user is fully logged in! |