1
0
mirror of git://f0xx.org/ac/ac-ms-identity synced 2026-07-30 02:37:39 +03:00

fix(2fa): expose qr scan URL with src=qr for phone camera links

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Anton Afanasyeu
2026-07-11 21:40:01 +02:00
parent 3c4e79ecfa
commit 40f969562f

View File

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