[PB-5655] feat(recovery): send backup public keys for validation during account#1805
[PB-5655] feat(recovery): send backup public keys for validation during account#1805douglas-xt wants to merge 8 commits intomasterfrom
Conversation
1a0901f to
59f430b
Compare
src/utils/backupKeyUtils.ts
Outdated
| ecc: user.keys?.ecc?.publicKey || '', | ||
| kyber: user.keys?.kyber?.publicKey || '', |
There was a problem hiding this comment.
I see that if for some reason the public keys are not there, empty strings will be exported.
When attempting to send this empty string, do we notify the user?
Shouldn't we notify them if empty strings are going to be exported?
There was a problem hiding this comment.
If both ecc and kyber public keys are not present, publicKeys shouldn't be exported at all. In order to keep backward compatibility, I've changed that.
src/services/auth.service.test.ts
Outdated
| }); | ||
|
|
||
| it('should successfully update credentials with token and with backup data (ECC only)', async () => { | ||
| it('should not send keys when backup data has no publicKeys (legacy backup)', async () => { |
There was a problem hiding this comment.
if doesn't mind, change the test that are modifying to "when X, then Y" format
|
|
This pull request has been inactive for 30 days. Is it still in progress? If so, please leave a comment or make an update to keep it open. Otherwise, it will be closed automatically in 15 days. |
|



… recovery
Description
This PR adds support for sending public keys during account recovery. When users export their backup file, it now includes both private and public keys. During account recovery, these public keys are extracted from the backup file and forwarded to the backend, which validates that they match the account being recovered.
Related Issues
Related Pull Requests
Checklist
Testing Process
Additional Notes
Updated @internxt/sdk from v1.11.17 to v1.12.0. This version includes a breaking change in changePasswordWithLinkV2 the keys parameter changed from PrivateKeys to RecoveryKeys ({ private?, public? }), which allows sending public keys alongside private keys during recovery.