diff --git a/mobile/lib/src/aeris_api.dart b/mobile/lib/src/aeris_api.dart index 5cebb725..015b2e7f 100644 --- a/mobile/lib/src/aeris_api.dart +++ b/mobile/lib/src/aeris_api.dart @@ -65,8 +65,11 @@ class AerisAPI { } Future createConnectionFromService(Service service, String code) async { + final serviceName = service == const Service.youtube() + ? "google" + : service.name.toLowerCase(); http.Response response = await _requestAPI( - '/auth/${service.name.toLowerCase()}/signin?code=$code', + '/auth/$serviceName/signin?code=$code', AerisAPIRequestType.post, {}); if (!response.ok) { return false; @@ -220,7 +223,7 @@ class AerisAPI { if (_connected) { header.addAll({'Authorization': 'Bearer $_jwt'}); } - const duration = Duration(seconds: 3); + const duration = Duration(seconds: 10); try { switch (requestType) { case AerisAPIRequestType.delete: diff --git a/mobile/lib/src/views/login_page.dart b/mobile/lib/src/views/login_page.dart index 81021d53..999152e3 100644 --- a/mobile/lib/src/views/login_page.dart +++ b/mobile/lib/src/views/login_page.dart @@ -77,7 +77,7 @@ class LoginPage extends StatelessWidget { label: service.name, callback: () async { await launch(Uri.parse(service.authSignInUrl).toString(), forceSafariVC: false); - return Future.delayed(Duration(seconds: 3)).then((value) { + return Future.delayed(Duration(seconds: 8)).then((value) { return GetIt.I().isConnected ? null : AppLocalizations.of(context).cantSignInFromService; }); }