Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3332832
D12122.id40681.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D12122.id40681.diff
View Options
diff --git a/lib/types/identity-service-types.js b/lib/types/identity-service-types.js
--- a/lib/types/identity-service-types.js
+++ b/lib/types/identity-service-types.js
@@ -123,6 +123,7 @@
// primary device
+deletePasswordUser?: (password: string) => Promise<void>;
+logOut: () => Promise<void>;
+ +logOutSecondaryDevice: () => Promise<void>;
+getKeyserverKeys: string => Promise<DeviceOlmOutboundKeys>;
// Users cannot register from web
+registerPasswordUser?: (
diff --git a/native/identity-service/identity-service-context-provider.react.js b/native/identity-service/identity-service-context-provider.react.js
--- a/native/identity-service/identity-service-context-provider.react.js
+++ b/native/identity-service/identity-service-context-provider.react.js
@@ -132,6 +132,14 @@
} = await getAuthMetadata();
return commRustModule.logOut(userID, deviceID, token);
},
+ logOutSecondaryDevice: async () => {
+ const {
+ deviceID,
+ userID,
+ accessToken: token,
+ } = await getAuthMetadata();
+ return commRustModule.logOutSecondaryDevice(userID, deviceID, token);
+ },
getKeyserverKeys: async (
keyserverID: string,
): Promise<DeviceOlmOutboundKeys> => {
diff --git a/web/grpc/identity-service-client-wrapper.js b/web/grpc/identity-service-client-wrapper.js
--- a/web/grpc/identity-service-client-wrapper.js
+++ b/web/grpc/identity-service-client-wrapper.js
@@ -141,6 +141,13 @@
await this.authClient.logOutUser(new Empty());
};
+ logOutSecondaryDevice: () => Promise<void> = async () => {
+ if (!this.authClient) {
+ throw new Error('Identity service client is not initialized');
+ }
+ await this.authClient.logOutSecondaryDevice(new Empty());
+ };
+
getKeyserverKeys: (keyserverID: string) => Promise<DeviceOlmOutboundKeys> =
async (keyserverID: string) => {
const client = this.authClient;
diff --git a/web/grpc/identity-service-context-provider.react.js b/web/grpc/identity-service-context-provider.react.js
--- a/web/grpc/identity-service-context-provider.react.js
+++ b/web/grpc/identity-service-context-provider.react.js
@@ -120,6 +120,7 @@
deleteWalletUser: proxyMethodToWorker('deleteWalletUser'),
deletePasswordUser: proxyMethodToWorker('deletePasswordUser'),
logOut: proxyMethodToWorker('logOut'),
+ logOutSecondaryDevice: proxyMethodToWorker('logOutSecondaryDevice'),
getKeyserverKeys: proxyMethodToWorker('getKeyserverKeys'),
getOutboundKeysForUser: proxyMethodToWorker('getOutboundKeysForUser'),
getInboundKeysForUser: proxyMethodToWorker('getInboundKeysForUser'),
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 22, 2:04 AM (5 h, 37 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2559357
Default Alt Text
D12122.id40681.diff (2 KB)
Attached To
Mode
D12122: [lib][native][web] Add LogOutSecondaryDevice RPC to identity client
Attached
Detach File
Event Timeline
Log In to Comment