Skip to content

Conversation

@mehcode
Copy link

@mehcode mehcode commented Aug 19, 2025

Implements farcasterxyz/protocol#244


Add GetFidByVerification to Hub which allows a developer to take an authorized address and return a FID.

The use case here is we ( Calaxy - https://calaxy.com ) are integrating with both Base.app and Farcaster. When logging in with Base, an ethereum address is returned ( ref: https://docs.base.org/base-account/overview/what-is-base-account ). When logging in with Farcaster, a FID is returned.

  • With an FID, it's possible currently to get a list of authorized ethereum addresses and match a previous "Base.app login" with a new "Farcaster login" to return the same user context
  • With just the address, its not currently possible to return an associated FID

This will be especially important as current Base.app applications with "Login with Base.app" end up becoming mini apps and using the embedded Farcaster SDK.

Open to anything with regards to naming. I tried to make it match the feel of what's there.

@vercel
Copy link

vercel bot commented Aug 19, 2025

@mehcode is attempting to deploy a commit to the farcaster Team on Vercel.

A member of the Team first needs to authorize it.

@sanjayprabhu
Copy link
Contributor

Nice. Could you please add store and server level tests?

@christopherwxyz
Copy link
Contributor

I don't think this will work as auth addresses can be tied to multiple FIDs? Per the spec multiple addresses can be verified and added. So maybe this method should return all FIDs for the given address.

@mehcode
Copy link
Author

mehcode commented Aug 25, 2025

I don't think this will work as auth addresses can be tied to multiple FIDs? Per the spec multiple addresses can be verified and added. So maybe this method should return all FIDs for the given address.

I'm only exposing via API what was already done in the secondary indexes inside of the verification store. If that part needs correcting, I'd love some help in the right direction. Though maybe that should also be a separate PR. I can adjust this one to return a list response so the API is compatible with the fix.

Nice. Could you please add store and server level tests?

Can you please link to an example of each and I'll give it a try?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants