Browse Source

Empty AccountKeys when no private key

pull/6761/head
Timshel 5 days ago
parent
commit
4ea16e3e0e
  1. 8
      src/api/identity.rs

8
src/api/identity.rs

@ -482,14 +482,18 @@ async fn authenticated_response(
Value::Null Value::Null
}; };
let account_keys = json!({ let account_keys = if user.private_key.is_some() {
json!({
"publicKeyEncryptionKeyPair": { "publicKeyEncryptionKeyPair": {
"wrappedPrivateKey": user.private_key, "wrappedPrivateKey": user.private_key,
"publicKey": user.public_key, "publicKey": user.public_key,
"Object": "publicKeyEncryptionKeyPair" "Object": "publicKeyEncryptionKeyPair"
}, },
"Object": "privateKeys" "Object": "privateKeys"
}); })
} else {
Value::Null
};
let mut result = json!({ let mut result = json!({
"access_token": auth_tokens.access_token(), "access_token": auth_tokens.access_token(),

Loading…
Cancel
Save