From 5fd20f808cbc2605051b48f830b1eb61c474807b Mon Sep 17 00:00:00 2001 From: RustDesk <71636191+rustdesk@users.noreply.github.com> Date: Wed, 22 Apr 2026 01:29:15 +0800 Subject: [PATCH] fix safari-oidc https://github.com/rustdesk/rustdesk/issues/14861 (#14867) --- flutter/lib/web/bridge.dart | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/flutter/lib/web/bridge.dart b/flutter/lib/web/bridge.dart index 1cfce661b..3d52e7d5d 100644 --- a/flutter/lib/web/bridge.dart +++ b/flutter/lib/web/bridge.dart @@ -1538,10 +1538,13 @@ class RustdeskImpl { Future mainAccountAuth( {required String op, required bool rememberMe, dynamic hint}) { - return Future(() => js.context.callMethod('setByName', [ + // Safari only allows auth popups while handling the original user gesture. + // Call into JS synchronously so the web OIDC flow can pre-open the window. + js.context.callMethod('setByName', [ 'account_auth', jsonEncode({'op': op, 'remember': rememberMe}) - ])); + ]); + return Future.value(); } Future mainAccountAuthCancel({dynamic hint}) {