From 89656472ef45d731d08db125ed638aa4f7c4ae02 Mon Sep 17 00:00:00 2001 From: Luigi311 Date: Mon, 24 Mar 2025 10:26:05 -0600 Subject: [PATCH] fix(mobile): fallback authentication client model/type to unknown (#17059) mobile: fallback authentication client model/type to unknown Add fallback for client model/type if device is not ios or android Signed-off-by: Luis Garcia --- mobile/lib/services/api.service.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mobile/lib/services/api.service.dart b/mobile/lib/services/api.service.dart index 1d17b71211..92b077ef59 100644 --- a/mobile/lib/services/api.service.dart +++ b/mobile/lib/services/api.service.dart @@ -172,11 +172,14 @@ class ApiService implements Authentication { authenticationApi.apiClient .addDefaultHeader('deviceModel', iosInfo.utsname.machine); authenticationApi.apiClient.addDefaultHeader('deviceType', 'iOS'); - } else { + } else if (Platform.isAndroid) { final androidInfo = await deviceInfoPlugin.androidInfo; authenticationApi.apiClient .addDefaultHeader('deviceModel', androidInfo.model); authenticationApi.apiClient.addDefaultHeader('deviceType', 'Android'); + } else { + authenticationApi.apiClient.addDefaultHeader('deviceModel', 'Unknown'); + authenticationApi.apiClient.addDefaultHeader('deviceType', 'Unknown'); } }