π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Add getPublicKey method to UserService for retrieving public keys by email
AmanRajSinghMourya326eb3ff8a22
diff --git a/mobile/packages/accounts/lib/services/user_service.dart b/mobile/packages/accounts/lib/services/user_service.dartindex ce636beae8..e6246fd1a9 100644--- a/mobile/packages/accounts/lib/services/user_service.dart+++ b/mobile/packages/accounts/lib/services/user_service.dart@@ -160,6 +160,24 @@ class UserService {);}+ // getPublicKey returns null value if email id is not+ // associated with another ente account+ Future<String?> getPublicKey(String email) async {+ try {+ final response = await _enteDio.get(+ "/users/public-key",+ queryParameters: {"email": email},+ );+ final publicKey = response.data["publicKey"];+ return publicKey;+ } on DioException catch (e) {+ if (e.response != null && e.response?.statusCode == 404) {+ return null;+ }+ rethrow;+ }+ }+Future<UserDetails> getUserDetailsV2({bool memoryCount = false,bool shouldCache = true,