-
Notifications
You must be signed in to change notification settings - Fork 33
[PB-5655] feat(recovery): send backup public keys for validation during account #1805
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Deploying drive-web with
|
| Latest commit: |
6d990bd
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://6b88a9d4.drive-web.pages.dev |
| Branch Preview URL: | https://feat-send-public-keys-on-rec.drive-web.pages.dev |
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
| }); | ||
|
|
||
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if doesn't mind, change the test that are modifying to "when X, then Y" format
|



… 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.