Skip to content

Commit 5fd20f8

Browse files
authored
fix safari-oidc rustdesk#14861 (rustdesk#14867)
1 parent 803ac8c commit 5fd20f8

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

flutter/lib/web/bridge.dart

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1538,10 +1538,13 @@ class RustdeskImpl {
15381538

15391539
Future<void> mainAccountAuth(
15401540
{required String op, required bool rememberMe, dynamic hint}) {
1541-
return Future(() => js.context.callMethod('setByName', [
1541+
// Safari only allows auth popups while handling the original user gesture.
1542+
// Call into JS synchronously so the web OIDC flow can pre-open the window.
1543+
js.context.callMethod('setByName', [
15421544
'account_auth',
15431545
jsonEncode({'op': op, 'remember': rememberMe})
1544-
]));
1546+
]);
1547+
return Future.value();
15451548
}
15461549

15471550
Future<void> mainAccountAuthCancel({dynamic hint}) {

0 commit comments

Comments
 (0)