diff --git a/lib/main.dart b/lib/main.dart index a8619b2..1fedff1 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -60,7 +60,7 @@ class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( - title: 'Flutter Demo', + title: 'LeineLab e.V. Key App', theme: ThemeData( colorScheme: ColorScheme.fromSeed(seedColor: Colors.yellow), ), @@ -564,7 +564,12 @@ class AuthentikUserSettingsChangeDialogState extends ChangeNotifier { server = await HttpServer.bind("127.0.0.1", 30165); - await launchUrl(authorizationUrl, mode: LaunchMode.externalApplication); + if (!await launchUrl( + authorizationUrl, + mode: LaunchMode.externalApplication, + )) { + throw Exception("Could not launch the authorization URL."); + } if (server == null) { // exit() might have been called before we arrived here.