HomePhabricator
Diffusion Comm d5263d00f887

[lib] check if the user fid is still valid

Description

[lib] check if the user fid is still valid

Summary:
This diff checks if the fid stored in the synced metadata table store is still valid. We could run into this situation, if a user connects their facaster account to their comm account, then later deletes their farcaster account, but their comm account still has the old deleted fid. If this is the case we should unlink this fid from the user's comm account

Linear task: https://linear.app/comm/issue/ENG-7277/check-if-the-user-fid-stored-in-the-synced-metadata-table-is-still

Depends on D12569

Test Plan:

  1. Linked a new comm account with my fid
  2. Intentionally passed in a hardcoded invalid fid into checkIfCurrentUserFIDIsValid to trigger this unlink mechanism
  3. Confirmed in the identity logs that the fid was removed and the account is now unlinked from my farcaster account

Reviewers: ashoat, inka

Reviewed By: ashoat

Subscribers: ashoat, tomek

Differential Revision: https://phab.comm.dev/D12685

Details

Provenance
ginsuAuthored on Jul 7 2024, 11:51 PM
Reviewer
ashoat
Differential Revision
D12685: [lib] check if the user fid is still valid
Parents
rCOMM97be818970cb: [lib/web] introduce handleCurrentUserFID to FarcasterDataHandler
Branches
Unknown
Tags
Unknown