From b441f8338c0375df3e288225acefb943c0b3cb05 Mon Sep 17 00:00:00 2001 From: Christian Riesen Date: Fri, 10 Jun 2016 16:47:22 +0200 Subject: [PATCH] Add image to options for google authenticator url Thanks to @SamuelDauzon for the idea. --- src/GoogleAuthenticator.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/GoogleAuthenticator.php b/src/GoogleAuthenticator.php index 4adb02b..0925510 100644 --- a/src/GoogleAuthenticator.php +++ b/src/GoogleAuthenticator.php @@ -98,6 +98,11 @@ public static function getKeyUri($type, $label, $secret, $counter = null, $optio $otpauth .= '&issuer=' . rawurlencode($options['issuer']); } + // image (to accepts images for freeotp) + if (array_key_exists('image', $options)) { + $otpauth .= '&image=' . $options['image']; + } + return $otpauth; }