You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Recording company name with authenticator app #152
// substitute your company or app name here
$tfa = new RobThree\Auth\TwoFactorAuth(new RobThree\Auth\Providers\Qr\QRServerProvider());
But it's not clear where to put the company name. I tried: $tfa = new RobThree\Auth\TwoFactorAuth(new RobThree\Auth\Providers\Qr\QRServerProvider('Company Name'));
... but after scanning the QR code, the Google Authenticator app I'm using does not show the company name. It only shows the user email from: $tfa->getQRCodeImageAsDataUri($username, $secret);
How do we enter the company name for the authenticator app?
Thanks! Another thing that was unclear from the documentation was that you don't really need to pick a QR code creator (like BaconQrCodeProvider, etc). I only figured out from the demo that we could just do:
$tfa = new RobThree\Auth\TwoFactorAuth(
new RobThree\Auth\Providers\Qr\QRServerProvider());
... and now with the company name, as you clarified:
$tfa = new RobThree\Auth\TwoFactorAuth(
new RobThree\Auth\Providers\Qr\QRServerProvider(),
"Acme");
Never submitted a PR before, looked at it and didn't know what to use for "Compare changes," but in Getting Started, under "Create an instance," you could list the example you used in the demo, which I ended up using (with the company name option added),
$tfa = new RobThree\Auth\TwoFactorAuth(
new RobThree\Auth\Providers\Qr\QRServerProvider(),
"Acme");
...as it is the simplest/easiest way to go, as far as I can see.
Activity
NicolasCARPi commentedon Dec 1, 2025
Hello,
That comment is misleading, we'll correct that.
The constructor takes an
issuernullable string as second argument:TwoFactorAuth/lib/TwoFactorAuth.php
Line 32 in 9b2d795
So it would be:
willpower232 commentedon Dec 1, 2025
ah yeah accidental removal of the company name in #130
jamminjames commentedon Dec 1, 2025
Thanks! Another thing that was unclear from the documentation was that you don't really need to pick a QR code creator (like BaconQrCodeProvider, etc). I only figured out from the demo that we could just do:
... and now with the company name, as you clarified:
NicolasCARPi commentedon Dec 1, 2025
@jamminjames Feel free to submit a PR with the changes would have liked to have seen in the doc ;)
jamminjames commentedon Dec 2, 2025
Never submitted a PR before, looked at it and didn't know what to use for "Compare changes," but in Getting Started, under "Create an instance," you could list the example you used in the demo, which I ended up using (with the company name option added),
...as it is the simplest/easiest way to go, as far as I can see.
doc: getting started: improve examples
NicolasCARPi commentedon Dec 2, 2025
Something like: #154 ?
doc: getting started: improve examples (#154)