login
to your app with their Farcaster account, you can configure 'farcaster'
as an upfront login method in your PrivyProvider
, like so:
Farcaster
object, including their fid
, username
, pfp
and more, in the user
object returned by the usePrivy
hook.
That’s it! Once you’ve linked a Farcaster account to a user object, you can use this to power composable experiences in your app. You should also consider using toolkits like Farcaster’s APIs or Neynar to query and interact with protocol data.
username
, pfp
) - while this is publicly available using a public hub endpoint, Privy caches a version whenever the user logs in for convenience. To refresh the Privy cache, you can use our REST API (server-auth
coming soon) and hitting the /api/v1/users/farcaster/refresh
endpoint.
getUserByFarcasterId
.
To be considerate of public hubs, we only allow refreshing of user data once every 24 hours. If you need more frequent than daily freshness, we recommend that you query public hub data using the user’s fid
.