Handle desktop logged into a different account for biometrics (#1533)
This commit is contained in:
parent
c4388dad66
commit
0511905ab4
|
@ -1420,6 +1420,12 @@
|
||||||
"nativeMessagingInvalidEncryptionTitle": {
|
"nativeMessagingInvalidEncryptionTitle": {
|
||||||
"message": "Desktop communication interrupted"
|
"message": "Desktop communication interrupted"
|
||||||
},
|
},
|
||||||
|
"nativeMessagingWrongUserDesc": {
|
||||||
|
"message": "The desktop application is logged into a different account. Please ensure both applications are logged into the same account."
|
||||||
|
},
|
||||||
|
"nativeMessagingWrongUserTitle": {
|
||||||
|
"message": "Account missmatch"
|
||||||
|
},
|
||||||
"biometricsNotEnabledTitle": {
|
"biometricsNotEnabledTitle": {
|
||||||
"message": "Biometrics not enabled"
|
"message": "Biometrics not enabled"
|
||||||
},
|
},
|
||||||
|
|
|
@ -106,6 +106,13 @@ export class NativeMessagingBackground {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case 'wrongUserId':
|
||||||
|
this.messagingService.send('showDialog', {
|
||||||
|
text: this.i18nService.t('nativeMessagingWrongUserDesc'),
|
||||||
|
title: this.i18nService.t('nativeMessagingWrongUserTitle'),
|
||||||
|
confirmText: this.i18nService.t('ok'),
|
||||||
|
type: 'error',
|
||||||
|
});
|
||||||
default:
|
default:
|
||||||
// Ignore since it belongs to another device
|
// Ignore since it belongs to another device
|
||||||
if (message.appId !== this.appId) {
|
if (message.appId !== this.appId) {
|
||||||
|
@ -247,7 +254,11 @@ export class NativeMessagingBackground {
|
||||||
this.publicKey = publicKey;
|
this.publicKey = publicKey;
|
||||||
this.privateKey = privateKey;
|
this.privateKey = privateKey;
|
||||||
|
|
||||||
this.sendUnencrypted({command: 'setupEncryption', publicKey: Utils.fromBufferToB64(publicKey)});
|
this.sendUnencrypted({
|
||||||
|
command: 'setupEncryption',
|
||||||
|
publicKey: Utils.fromBufferToB64(publicKey),
|
||||||
|
userId: await this.userService.getUserId()
|
||||||
|
});
|
||||||
|
|
||||||
return new Promise((resolve, reject) => this.secureSetupResolve = resolve);
|
return new Promise((resolve, reject) => this.secureSetupResolve = resolve);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue