aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-hub/src/meshbay_hub/static/profile-page.js
diff options
context:
space:
mode:
Diffstat (limited to 'packages/meshbay-hub/src/meshbay_hub/static/profile-page.js')
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/profile-page.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/profile-page.js b/packages/meshbay-hub/src/meshbay_hub/static/profile-page.js
index 7c36951..1800d72 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/profile-page.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/profile-page.js
@@ -147,7 +147,8 @@ export function ProfilePage({ user, onLogout }) {
// In the desktop application both are kept by its main process, the new
// one set aside until the hub has accepted the change.
const K = window.MeshBayKeys;
- const { pepper, version } = await K.fetchBundlePepper(user.token);
+ const oldAuthKey = await K.deriveAuthKey(cpOld, user.username);
+ const { pepper, version } = await K.fetchBundlePepper(user.token, oldAuthKey);
const oldKey = await K.sessionBundleKey(
cpOld, user.username, user.userId, pepper, version);
const newKey = await K.sessionBundleKey(
@@ -160,7 +161,6 @@ export function ProfilePage({ user, onLogout }) {
bundleKey: oldKey, newBundleKey: newKey,
onProgress: setCpProgress,
});
- const oldAuthKey = await window.MeshBayKeys.deriveAuthKey(cpOld, user.username);
const newAuthKey = await window.MeshBayKeys.deriveAuthKey(cpNew, user.username);
resp = await hubFetch('/v1/users/password', {
method: 'POST', token: user.token,