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; }