Skip to content

Commit a73fa3c

Browse files
authored
refact: oidc, launch url (rustdesk#11772)
Signed-off-by: fufesou <linlong1266@gmail.com>
1 parent ae7faea commit a73fa3c

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

flutter/lib/common.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2878,6 +2878,7 @@ Future<bool> canBeBlocked() async {
28782878
return access_mode == 'view' || (access_mode.isEmpty && !option);
28792879
}
28802880

2881+
// to-do: web not implemented
28812882
Future<void> shouldBeBlocked(RxBool block, WhetherUseRemoteBlock? use) async {
28822883
if (use != null && !await use()) {
28832884
block.value = false;

flutter/lib/common/widgets/login.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,13 @@ class _WidgetOPState extends State<WidgetOP> {
166166
final String stateMsg = resultMap['state_msg'];
167167
String failedMsg = resultMap['failed_msg'];
168168
final String? url = resultMap['url'];
169+
final bool urlLaunched = (resultMap['url_launched'] as bool?) ?? false;
169170
final authBody = resultMap['auth_body'];
170171
if (_stateMsg != stateMsg || _failedMsg != failedMsg) {
171172
if (_url.isEmpty && url != null && url.isNotEmpty) {
172-
launchUrl(Uri.parse(url), mode: LaunchMode.externalApplication);
173+
if (!urlLaunched) {
174+
launchUrl(Uri.parse(url), mode: LaunchMode.externalApplication);
175+
}
173176
_url = url;
174177
}
175178
if (authBody != null) {

0 commit comments

Comments
 (0)