Page MenuHomePhorge

D11433.1767101400.diff
No OneTemporary

Size
2 KB
Referenced Files
None
Subscribers
None

D11433.1767101400.diff

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
@@ -161,6 +161,7 @@
farcasterIDs: $ReadOnlyArray<string>,
) => Promise<$ReadOnlyArray<FarcasterUser>>;
+linkFarcasterAccount: (farcasterID: string) => Promise<void>;
+ +unlinkFarcasterAccount: () => Promise<void>;
}
export type IdentityServiceAuthLayer = {
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
@@ -553,6 +553,14 @@
farcasterID,
);
},
+ unlinkFarcasterAccount: async () => {
+ const {
+ deviceID,
+ userID,
+ accessToken: token,
+ } = await getAuthMetadata();
+ return commRustModule.unlinkFarcasterAccount(userID, deviceID, token);
+ },
}),
[getAuthMetadata],
);
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
@@ -572,6 +572,14 @@
linkFarcasterAccountRequest.setFarcasterId(farcasterID);
await client.linkFarcasterAccount(linkFarcasterAccountRequest);
};
+
+ unlinkFarcasterAccount: () => Promise<void> = async () => {
+ const client = this.authClient;
+ if (!client) {
+ throw new Error('Identity service client is not initialized');
+ }
+ await client.unlinkFarcasterAccount(new Empty());
+ };
}
function authNewDeviceKeyUpload(
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
@@ -135,6 +135,7 @@
),
getFarcasterUsers: proxyMethodToWorker('getFarcasterUsers'),
linkFarcasterAccount: proxyMethodToWorker('linkFarcasterAccount'),
+ unlinkFarcasterAccount: proxyMethodToWorker('unlinkFarcasterAccount'),
};
}, [proxyMethodToWorker]);

File Metadata

Mime Type
text/plain
Expires
Tue, Dec 30, 1:30 PM (8 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5867271
Default Alt Text
D11433.1767101400.diff (2 KB)

Event Timeline