feature: Deprecated authwebview and use platform browser
This commit is contained in:
parent
dda51b1b46
commit
4e5e3a80d6
5 changed files with 33 additions and 82 deletions
|
|
@ -20,6 +20,7 @@ import 'package:future_loading_dialog/future_loading_dialog.dart';
|
|||
import 'package:provider/provider.dart';
|
||||
import 'package:universal_html/prefer_universal/html.dart' as html;
|
||||
import 'package:http/http.dart' as http;
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
/*import 'package:fluffychat/views/chat.dart';
|
||||
import 'package:fluffychat/app_config.dart';
|
||||
import 'package:dbus/dbus.dart';
|
||||
|
|
@ -159,13 +160,21 @@ class MatrixState extends State<Matrix> {
|
|||
),
|
||||
);
|
||||
default:
|
||||
await widget.apl.currentState.pushNamed(
|
||||
'/authwebview/$stage/${uiaRequest.session}',
|
||||
arguments: () => null,
|
||||
);
|
||||
return uiaRequest.completeStage(
|
||||
AuthenticationData(session: uiaRequest.session),
|
||||
await launch(
|
||||
Matrix.of(context).client.homeserver.toString() +
|
||||
'/_matrix/client/r0/auth/$stage/fallback/web?session=${uiaRequest.session}',
|
||||
);
|
||||
if (OkCancelResult.ok ==
|
||||
await showOkCancelAlertDialog(
|
||||
message: L10n.of(context).pleaseFollowInstructionsOnWeb,
|
||||
context: context,
|
||||
okLabel: L10n.of(context).next,
|
||||
cancelLabel: L10n.of(context).cancel,
|
||||
)) {
|
||||
return uiaRequest.completeStage(
|
||||
AuthenticationData(session: uiaRequest.session),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue