mirror of
git://f0xx.org/ac/ac-ms-identity
synced 2026-07-30 02:37:39 +03:00
fix(2fa): resolve approve URL from public_origin config
Use cfg('public_origin') instead of a hardcoded apps host so lab and prod
login QR links match the deployed BE origin.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -26,7 +26,8 @@ final class AuthTwoFactorPage {
|
||||
// Store token in session so the poll endpoint can reference it
|
||||
$_SESSION['pending_2fa_approval_token'] = $rawToken;
|
||||
|
||||
$approveUrl = 'https://apps.f0xx.org' . $project . '/two-factor/approve?token=' . urlencode($rawToken);
|
||||
$origin = rtrim((string) cfg('public_origin', 'https://apps.f0xx.org'), '/');
|
||||
$approveUrl = $origin . $project . '/two-factor/approve?token=' . urlencode($rawToken);
|
||||
|
||||
$payload = [
|
||||
'long_url' => $approveUrl,
|
||||
|
||||
Reference in New Issue
Block a user