Include accountname in totp url
[mirror/userdir-ldap-cgi.git] / fetch-totp-seed.cgi
index 98ed798..3bcc447 100644 (file)
@@ -33,7 +33,7 @@ my $seed = encode_base32(pack('H*', $hex_seed));
 close $fh;
 #unlink $filename;
 
-my $totpurl = "otpauth://totp/Debian?secret=$seed&issuer=Debian";
+my $totpurl = "otpauth://totp/Debian:$accountname?secret=$seed&issuer=Debian";
 my $totppng = "data:image/png;base64, " .
        encode_base64(GD::Barcode::QRcode->new($totpurl,
                                               { ModuleSize => 10 })->plot->png);