mirror of
git://f0xx.org/ac/ac-deploy
synced 2026-07-29 02:18:40 +03:00
fix(cluster0): 2FA nginx routes and extend pending-2FA on poll
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -274,6 +274,8 @@ if (
|
||||
echo json_encode(['status' => 'expired']);
|
||||
exit;
|
||||
}
|
||||
// Keep the pending-2FA window alive while the desktop polls (5 min from last poll).
|
||||
$_SESSION['pending_2fa_exp'] = time() + 300;
|
||||
$status = AuthApproval::pollStatus($rawToken);
|
||||
if ($status === 'approved') {
|
||||
// Attempt to complete the login server-side within this same request
|
||||
|
||||
@@ -51,7 +51,7 @@ server {
|
||||
|
||||
# Shared session auth at project root — composed ac/* backend
|
||||
# Includes 2FA cross-device and polling endpoints
|
||||
location ~ ^/app/androidcast_project/(login|logout|register|two-factor|verify-email|api/two-factor)(/|$) {
|
||||
location ~ ^/app/androidcast_project/(login|logout|register|two-factor(?:/approve)?|verify-email|api/two-factor(?:/poll)?)(/|$) {
|
||||
include fastcgi_params;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_param SCRIPT_FILENAME /var/www/ac/composed/backend/public/index.php;
|
||||
|
||||
Reference in New Issue
Block a user