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; +logOut: () => Promise; + +logOutSecondaryDevice: () => Promise; +getKeyserverKeys: string => Promise; +registerPasswordUser?: ( username: string, 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 @@ -110,6 +110,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 => { 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 = async () => { + if (!this.authClient) { + throw new Error('Identity service client is not initialized'); + } + await this.authClient.logOutSecondaryDevice(new Empty()); + }; + getKeyserverKeys: (keyserverID: string) => Promise = 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'),