|
@@ -4,6 +4,7 @@ import 'package:flutter/widgets.dart';
|
|
|
import 'package:logging/logging.dart';
|
|
|
import 'package:photos/core/configuration.dart';
|
|
|
import 'package:photos/core/event_bus.dart';
|
|
|
+import 'package:photos/db/public_keys_db.dart';
|
|
|
|
|
|
import 'package:photos/events/user_authenticated_event.dart';
|
|
|
import 'package:photos/models/key_attributes.dart';
|
|
@@ -58,7 +59,9 @@ class UserService {
|
|
|
},
|
|
|
),
|
|
|
);
|
|
|
- return response.data["publicKey"];
|
|
|
+ final publicKey = response.data["publicKey"];
|
|
|
+ await PublicKeysDB.instance.setKey(email, publicKey);
|
|
|
+ return publicKey;
|
|
|
} on DioError catch (e) {
|
|
|
_logger.info(e);
|
|
|
return null;
|