Crypto identity reset (#3107)

* Add EncryptionReset password entry screen

* Expose client proxy identity reset method

* Update the IdentityConfirmationScreen to the latest designs

* Replace the old recovery key reset screen with a new EncryptionReset one

* Fixes #3102 - Add support for resetting the user's whole crypto identity

* Address review comments

* Bump the SDK to v1.0.30
This commit is contained in:
Stefan Ceriu
2024-08-05 09:35:18 +03:00
committed by GitHub
parent 276bbb09f2
commit 63e0b94764
58 changed files with 1217 additions and 319 deletions
@@ -883,7 +883,7 @@ class ClientProxy: ClientProxyProtocol {
}
}
// MARK: - Encryption
// MARK: - Crypto
func ed25519Base64() async -> String? {
await client.encryption().ed25519Key()
@@ -892,6 +892,14 @@ class ClientProxy: ClientProxyProtocol {
func curve25519Base64() async -> String? {
await client.encryption().curve25519Key()
}
func resetIdentity() async -> Result<IdentityResetHandle?, ClientProxyError> {
do {
return try await .success(client.encryption().resetIdentity())
} catch {
return .failure(.sdkError(error))
}
}
}
extension ClientProxy: MediaLoaderProtocol {
@@ -190,8 +190,10 @@ protocol ClientProxyProtocol: AnyObject, MediaLoaderProtocol {
func recentConversationCounterparts() async -> [UserProfileProxy]
// MARK: - Encryption Info
// MARK: - Crypto
func ed25519Base64() async -> String?
func curve25519Base64() async -> String?
func resetIdentity() async -> Result<IdentityResetHandle?, ClientProxyError>
}