Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32509299
D11433.1767101400.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D11433.1767101400.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
@@ -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
Details
Attached
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)
Attached To
Mode
D11433: [lib][web][native] add unlinkFarcasterAccount to IdentityServiceClient interface and implementations
Attached
Detach File
Event Timeline
Log In to Comment