We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7f65a25 commit 347279aCopy full SHA for 347279a
src/api/identity.rs
@@ -482,14 +482,18 @@ async fn authenticated_response(
482
Value::Null
483
};
484
485
- let account_keys = json!({
486
- "publicKeyEncryptionKeyPair": {
487
- "wrappedPrivateKey": user.private_key,
488
- "publicKey": user.public_key,
489
- "Object": "publicKeyEncryptionKeyPair"
490
- },
491
- "Object": "privateKeys"
492
- });
+ let account_keys = if user.private_key.is_some() {
+ json!({
+ "publicKeyEncryptionKeyPair": {
+ "wrappedPrivateKey": user.private_key,
+ "publicKey": user.public_key,
+ "Object": "publicKeyEncryptionKeyPair"
+ },
+ "Object": "privateKeys"
493
+ })
494
+ } else {
495
+ Value::Null
496
+ };
497
498
let mut result = json!({
499
"access_token": auth_tokens.access_token(),
0 commit comments