Skip to content

Commit

Permalink
add: update keys correctly after updating the password
Browse files Browse the repository at this point in the history
  • Loading branch information
Fubinator committed Nov 22, 2024
1 parent 1736f43 commit d0dd153
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/auth/AuthClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,16 @@ export class AuthClient {
encryptedItemKeys
);

if (this.keys) {
this.keys.encryptionPublicKey = this.user.keys.encryptionPublicKey;
this.keys.encryptionSecretKey = this.user.keys.encryptionSecretKey;
}

if (typeof window !== "undefined") {
localStorage.setItem("encKey", this.user.keys.encryptionSecretKey);
localStorage.setItem("encPubKey", this.user.keys.encryptionPublicKey);
}

return {
encryptionPublicKey: this.user.keys.encryptionPublicKey,
encryptionSecretKey: this.user.keys.encryptionSecretKey,
Expand Down

0 comments on commit d0dd153

Please sign in to comment.