From 40f969562f455e2d385132ba8a0d9e9ad13c1276 Mon Sep 17 00:00:00 2001 From: Anton Afanasyeu Date: Sat, 11 Jul 2026 21:40:01 +0200 Subject: [PATCH] fix(2fa): expose qr scan URL with src=qr for phone camera links Co-authored-by: Cursor --- src/AuthTwoFactorPage.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/AuthTwoFactorPage.php b/src/AuthTwoFactorPage.php index 1fe4cdb..cad0a69 100644 --- a/src/AuthTwoFactorPage.php +++ b/src/AuthTwoFactorPage.php @@ -60,6 +60,11 @@ final class AuthTwoFactorPage { } if ($shortUrl !== '') { $payload['short_url'] = $shortUrl; + if (is_callable([ShortLinksRepository::class, 'qrScanUrl'])) { + $payload['scan_url'] = ShortLinksRepository::qrScanUrl($shortUrl); + } else { + $payload['scan_url'] = $shortUrl . (str_contains($shortUrl, '?') ? '&' : '?') . 'src=qr'; + } } return $payload; }