diff --git a/lib/components/Login/LoginForm.dart b/lib/components/Login/LoginForm.dart index c315b410..e2078b12 100644 --- a/lib/components/Login/LoginForm.dart +++ b/lib/components/Login/LoginForm.dart @@ -62,6 +62,16 @@ class LoginForm extends HookConsumerWidget { const SizedBox(height: 20), ElevatedButton( onPressed: () async { + if (clientSecretController.text.isEmpty || + clientIdController.text.isEmpty) { + ScaffoldMessenger.of(context).showSnackBar( + const SnackBar( + content: Text("Please fill in all fields"), + behavior: SnackBarBehavior.floating, + ), + ); + return; + } await handleLogin(authState); }, child: const Text("Submit"), diff --git a/lib/utils/service_utils.dart b/lib/utils/service_utils.dart index 315c24ee..574899c8 100644 --- a/lib/utils/service_utils.dart +++ b/lib/utils/service_utils.dart @@ -184,8 +184,12 @@ abstract class ServiceUtils { mode: LaunchMode.externalApplication, ); - HttpServer server = - await HttpServer.bind(InternetAddress.loopbackIPv4, 4304); + HttpServer server = await HttpServer.bind( + InternetAddress.loopbackIPv4, + 4304, + shared: true, + ); + logger.i("[connectIpc] Server started"); await for (HttpRequest request in server) {