RobThree / TwoFactorAuth

PHP library for Two Factor Authentication (TFA / 2FA)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

QRCode Redirect

killrawr opened this issue · comments

Is there anyway to setup custom redirect for scanned QR Codes?

Can you explain what you mean with "custom redirect"? This library does no redirects at all?

I found a website http://www.qrstuff.com/ where you can create a "QRCode" then have the Code redirect to a selected path.

qrcode 36571714

_The above QR Code has Website URL to Google NZ

I was wondering once a user scans the QRCode its possible to have it redirect somewhere. e.g.

http://www.mywebsite.com/login_service/?secret=AUYWWBWM6SKQJZZ2&issuer=MyApp&period-30&alogrithm=SHA1&digits=6

instead of how it currently just returns site data "opauth://topp/..."

qrcode_result

Is there function or option I can place into $tfa->getQRCodeImageAsDataUri to provide redirect data?

No, that's not how QR codes for 2FA work. You could easily change the source to include a URL but your app scanning the code would be the only one supporting/understanding it making the QR code incompatible with all other apps like Google Authenticator, Authy or LastPass Authenticator for example.

Damn, that's okay, I was just interested in whether it would be okay without technical limitations. Thanks.

YW 👍