Commit 7301d72
Include the otpauth url when retrieving the QR svg (#356)
* Include the otpauth url when retrieving the QR svg
This small change adds the otpauth:// url to the json output when retrieving the QR code svg image.
On some devices, notably iOS 15 and macOS Monterey, it is possible to add the 2 step verification code directly in the system keychain. This allows for autofilling the verification code, so no need for switch to another app. Note that the input for the verification code has to be marked with `autocomplete="one-time-token"`.
However, this nice feature is difficult if not impossible to use when only showing the QR code image, because the camera can not see it's own screen if you know what I mean 👀.
Adding the url makes it possible to show a button 'Add on this device', that simply is a link to the otpauth url. Clicking it will open the system dialog to confirm and add it to a specific account. I tested on both iOS and macOS and it works.
See also the [Apple documentation](https://developer.apple.com/documentation/authenticationservices/securing_logins_with_icloud_keychain_verification_codes), the mention an apple specific prefix, but it works also without the prefix.
* Update TwoFactorQrCodeController.php
Co-authored-by: Taylor Otwell <[email protected]>1 parent 2602b19 commit 7301d72
1 file changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
23 | 26 | | |
24 | 27 | | |
0 commit comments