I'm developing a website that requires a 2FA. We already permit to users to set it by scanning a QR Code shown in our configuration page.
My question is a bit more tricky. How can I permit user to open the app if he opens the page from mobile browser, ie. navigating from the phone with the Authenticator app installed?
I already have the logic to understand if the user is on mobile or not, but I don't find any solution that can replace the QRCode since the user cannot use the mobile camera in that case (he is using the phone to net on my website!).
I was searching the possibility to create a link that is recognised by an authenticator app (Google Authenticator or Microsoft Authenticator) but I didn't find a solution. Any idea?
After some research and trial, I found the link I was searching for. In Google Authenticator (or any other app), the account are listed in the form:
In order to generate a new entry without scanning the QRCode, a link in the form of:
otpauth://totp/[email protected]?secret=123abc&issuer=StackOverflow
has to be opened. For instance, the link above results in the following entry:
The link is opened by the phone using the installed Authenticator app.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With