lawk
April 4, 2024, 10:24pm
1
SYSTEM INFORMATION
OS type and version
Almalinux 9.3
Webmin version
2.105
When enabling 2FA with google authenticator it loads the key and it works. But there is no QR code displayed. It is a little annoying entering it manually as I plan to enable this for multiple users.
what could be the issue for the QR code not to display? Is there some dependancy I need to install?
Joe
April 4, 2024, 10:36pm
2
It comes from Google. Are you blocking some Google URLs in your browser?
$user->{'twofactor_id'} ||= &encode_base32(&generate_base32_secret());
return undef;
}
# message_twofactor_totp(&user)
# Returns HTML to display after a user enrolls
sub message_twofactor_totp
{
my ($user) = @_;
my $name = &urlize(&get_display_hostname() . " (" . $user->{'name'} . ")");
my $url = "https://chart.googleapis.com/chart".
"?chs=200x200&chld=M|0&cht=qr&chl=otpauth://totp/".
$name."%3Fsecret%3D".$user->{'twofactor_id'};
my $rv;
$rv .= &text('twofactor_qrcode', "<tt>$user->{'twofactor_id'}</tt>")."<p>\n";
$rv .= "<img src='$url' border=0><p>\n";
return $rv;
}
# validate_twofactor_totp(id, token, apikey)
# Checks the validity of some token with google authenticator
lawk
April 4, 2024, 10:44pm
3
I tried without ublock origin browser plugin but the issue is the same.
ID10T
April 5, 2024, 1:20am
4
I use multiple browsers. I leave at least one ‘default’. Even that is problematic as browsers are now sometimes being kind enough to make security decisions on their own. Might try a clean copy of Chrome for this one?
Use Inspect in the browser, the network tab will show if there is a issue with connecting to google.
1 Like
lawk
April 5, 2024, 3:01pm
6
It also doesnt work in vanilla chrome.
this is the error:
failed net::ERR_BLOCKED_BY_ORB
lawk
April 5, 2024, 3:34pm
8
Is it possible to change API if the google one is broken?
maybe this could display it:
https://qrcode.tec-it.com/en
Joe
April 5, 2024, 3:44pm
9
If the Google one is broken, I’d rather we bundle a local one. Depending on remote ones leaves quite a few ways for it to fail.
lawk
April 5, 2024, 3:47pm
10
yes probably safer too.
maybe someone else can confirm or reproduce the problem.
lawk
April 7, 2024, 3:20am
11
I added the patch and no qr code getting generated.
lawk
April 7, 2024, 11:14am
13
Ilia
April 7, 2024, 11:40am
14
The fix hasn’t been delivered yet. It will be included in upcoming Webmin 2.110 release.
You don’t need QR code to make things work, just enter provided key manually.
lawk
April 7, 2024, 12:14pm
15
yes I understood it like stefan tried the new url parameters manually.
Joe
April 7, 2024, 11:21pm
16
Jamie made an additional patch to use qrencode
or a Perl QR code library, if either is available, which removes the dependence on an outside web service.
committed 11:14PM - 07 Apr 24 UTC
I got it to work in chrome after 2 goes but get broken link in firefox
system
Closed
June 7, 2024, 1:57am
20
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.