diff --git a/packages/core/src/api/user-manager.ts b/packages/core/src/api/user-manager.ts index a884d37c1..411b5fd06 100644 --- a/packages/core/src/api/user-manager.ts +++ b/packages/core/src/api/user-manager.ts @@ -538,10 +538,11 @@ class UserManager { public: keys.publicKey, private: await this.db .storage() - .encrypt(userEncryptionKey, JSON.stringify(keys.privateKey)) + .encrypt(userEncryptionKey, keys.privateKey) } }; await this.updateUser(updatePayload); + this.keyManager.clearCache(); } async sendVerificationEmail(newEmail?: string) {