Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3343588
D13764.id45307.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
998 B
Referenced Files
None
Subscribers
None
D13764.id45307.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 23, 3:25 AM (18 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2558547
Default Alt Text
D13764.id45307.diff (998 B)
Attached To
Mode
D13764: [keyserver] add identity util to call rust-node-addon client method for resetting user passwords
Attached
Detach File
Event Timeline
Log In to Comment