Page MenuHomePhabricator

D13764.id45307.diff
No OneTemporary

D13764.id45307.diff

diff --git a/keyserver/src/utils/identity-utils.js b/keyserver/src/utils/identity-utils.js
--- a/keyserver/src/utils/identity-utils.js
+++ b/keyserver/src/utils/identity-utils.js
@@ -40,6 +40,24 @@
);
}
+async function privilegedResetUserPassword(
+ username: string,
+ password: string,
+): Promise<void> {
+ const [rustAPI, identityInfo, deviceID] = await Promise.all([
+ getRustAPI(),
+ verifyUserLoggedIn(),
+ getContentSigningKey(),
+ ]);
+ await rustAPI.privilegedResetUserPassword(
+ identityInfo.userId,
+ deviceID,
+ identityInfo.accessToken,
+ username,
+ password,
+ );
+}
+
async function syncPlatformDetails(identityInfo: IdentityInfo): Promise<void> {
const [rustAPI, deviceID] = await Promise.all([
getRustAPI(),
@@ -52,4 +70,9 @@
);
}
-export { findUserIdentities, privilegedDeleteUsers, syncPlatformDetails };
+export {
+ findUserIdentities,
+ privilegedDeleteUsers,
+ privilegedResetUserPassword,
+ syncPlatformDetails,
+};

File Metadata

Mime Type
text/plain
Expires
Thu, Nov 21, 9:09 PM (45 m, 40 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2558547
Default Alt Text
D13764.id45307.diff (998 B)

Event Timeline