From e213f451139daf83a85756936f56478950400fad Mon Sep 17 00:00:00 2001 From: JE4GLE <56178675+JE4GLE@users.noreply.github.com> Date: Thu, 7 Nov 2019 13:43:21 +0100 Subject: [PATCH] Changed QR Code The QR-Code requires the title to be in front of the name seperated by ':' to be displayed in apps like Authy --- PHPGangsta/GoogleAuthenticator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PHPGangsta/GoogleAuthenticator.php b/PHPGangsta/GoogleAuthenticator.php index bf7d116..85badc3 100644 --- a/PHPGangsta/GoogleAuthenticator.php +++ b/PHPGangsta/GoogleAuthenticator.php @@ -104,7 +104,7 @@ public function getQRCodeGoogleUrl($name, $secret, $title = null, $params = arra $height = !empty($params['height']) && (int) $params['height'] > 0 ? (int) $params['height'] : 200; $level = !empty($params['level']) && array_search($params['level'], array('L', 'M', 'Q', 'H')) !== false ? $params['level'] : 'M'; - $urlencoded = urlencode('otpauth://totp/'.$name.'?secret='.$secret.''); + $urlencoded = urlencode('otpauth://totp/'.(isset($title) ? urlencode($title).':':'').$name.'?secret='.$secret.''); if (isset($title)) { $urlencoded .= urlencode('&issuer='.urlencode($title)); }