Farcaster is a sufficiently decentralized social network whose core social graph is stored on-chain. Users can choose how content they create is stored and it enables unique, composable experiences by enabling users to link their accounts with a wallet of their choosing.Privy enables your users to easily log in to your app using their Farcaster account. This means you can easily integrate Privy with Farcaster to compose experiences with a user’s existing social graph or network.Here’s how!
Log in with Farcaster enables log in and read access to a user’s Farcaster account but does not
provide write access to the account today.
Go to your app in your developer dashboard and navigate to User management > Authentication > Socials. From here, enable Farcaster as a social option.This will enable you to configure Farcaster as a login and account linking option in your app.
The following assumes you have set up Privy with your app. If you haven’t, start by following the instructions in the Privy Quickstart to get your app set up with Privy.From there, if you’d like users to be able to login to your app with their Farcaster account, you can configure 'farcaster' as an upfront login method in your PrivyProvider, like so:
<PrivyProvider appId={process.env.NEXT_PUBLIC_PRIVY_APP_ID} config={{ // This configures email, farcaster and wallet login for your app. appearance: { loginMethods: ['farcaster', ...insertTheRestOfYourLoginMethods] }, ...insertTheRestOfYourPrivyProviderConfig }}>
You can also prompt existing users to link their Farcaster account to their existing account.
import {usePrivy} from '@privy-io/react-auth';function Page() { const {linkFarcaster} = usePrivy(); // You may replace this hook with any of the other `link-` hooks to // link a different account type. return <button onClick={linkFarcaster}>Link your Farcaster</button>;}
Once a user has logged in with or linked their Farcaster account, you can find their 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.
Sometimes, a user may update their Farcaster profile information (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.
If you’re simply looking for the current Privy user object, we recommend using 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.
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Privy Docs","colors":{"primary":"#010110","light":"#FFFFFF"},"logo":{"light":"https://mintcdn.com/privy-c2af3412/Ih_Fo3QYM486gzWq/logo/privy-logo-light.png?fit=max\u0026auto=format\u0026n=Ih_Fo3QYM486gzWq\u0026q=85\u0026s=bd297b680ace8a13db4d9ce977f93180","dark":"https://mintcdn.com/privy-c2af3412/Ih_Fo3QYM486gzWq/logo/privy-logo-dark.png?fit=max\u0026auto=format\u0026n=Ih_Fo3QYM486gzWq\u0026q=85\u0026s=24d83970695ab19a1803a2eb00dbea4e"},"favicon":"https://mintcdn.com/privy-c2af3412/YByWVKlFbSpnpSJG/favicon.png?fit=max\u0026auto=format\u0026n=YByWVKlFbSpnpSJG\u0026q=85\u0026s=ee4038168ea586e5f72041e5e2a1f5c8","api":{"openapi":{"source":"https://api.staging.privy.io/v1/openapi.json"},"playground":{"display":"interactive"},"examples":{"languages":["curl","java","javascript","php","go"]},"mdx":{"server":"https://api.privy.io"}},"background":{"color":{"light":"#FFFFFF","dark":"#010110"}},"navbar":{"links":[{"href":"https://demo.privy.io","label":"Demo"},{"href":"https://privy.io/slack","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://dashboard.privy.io"}},"seo":{"metatags":{"og:type":"website","og:site_name":"Privy Docs","og:image":"https://assets.privy.io/docs-og.png","twitter:title":"Privy Docs","twitter:card":"summary_large_image","twitter:image":"https://assets.privy.io/docs-og.png"},"organization":{"id":"https://www.privy.io/#organization","name":"Privy","url":"https://www.privy.io","logo":"https://assets.privy.io/docs-og.png","sameAs":["https://x.com/privy_io","https://github.com/privy-io"]}},"styling":{"codeblocks":"system","latex":true},"integrations":{"gtm":{"tagId":"GTM-WV9MVTB3"}},"contextual":{"options":["claude","chatgpt","cursor","vscode","mcp","copy","view"],"display":"header"},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"privy-c2af3412","hasAudioNarration":false,"actualSubdomain":"privy-c2af3412","customDomains":["docs.privy.io"],"gitSource":{"type":"github","owner":"privy-io","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"issues":true,"thumbs":true,"edits":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"ENABLED"},"CONTEXTUAL_FEEDBACK":{"status":"ENABLED"},"CODE_SNIPPET_FEEDBACK":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6aee6add0cb48ef71e0f1964","clientVersion":"0.0.4087","searchFilterCounts":[{"language":"default","tag":"Wallets","count":291},{"language":"default","tag":"API reference","count":255},{"language":"default","tag":"Recipes","count":141},{"language":"default","tag":"All recipes","count":140},{"language":"default","tag":"Identity","count":137},{"language":"default","tag":"Signatures and transactions","count":91},{"language":"default","tag":"Users","count":87},{"language":"default","tag":"Basics","count":86},{"language":"default","tag":"Financial flows","count":82},{"language":"default","tag":"Controls","count":76}]},"assistantConfig":{},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","href":"/_mintlify/custom/privy-c2af3412/106de3f982828597/style.css"}],"page":{"pagePath":"recipes/farcaster/login","slug":"/recipes/farcaster/login","pageMetadata":{"title":"Login with Farcaster","description":null,"href":"/recipes/farcaster/login"},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,..._provideComponents(),...props.components},{CodeBlock,Heading,Tip}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[_jsx(_components.a,{href:`https://www.farcaster.xyz/`,children:_jsx(_components.strong,{children:`Farcaster`})}),` is a sufficiently decentralized social network whose core social graph is stored on-chain. Users can choose how content they create is stored and it enables unique, composable experiences by enabling users to link their accounts with a wallet of their choosing.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Privy enables your users to easily log in to your app using their Farcaster account.`}),` This means you can easily integrate Privy with Farcaster to compose experiences with a user’s existing social graph or network.`]}),`\n`,_jsx(_components.p,{children:`Here’s how!`}),`\n`,_jsx(Tip,{children:_jsx(_components.p,{children:`Log in with Farcaster enables log in and read access to a user’s Farcaster account but does not\nprovide write access to the account today.`})}),`\n`,`\n`,_jsx(Heading,{level:`3`,id:`1-enable-farcaster-login-in-your-dashboard`,children:`1. Enable Farcaster login in your dashboard`}),`\n`,_jsxs(_components.p,{children:[`Go to your app in your `,_jsx(_components.a,{href:`https://dashboard.privy.io`,children:`developer dashboard`}),` and navigate to `,_jsx(_components.strong,{children:`User management > Authentication > Socials`}),`. From here, enable `,_jsx(_components.strong,{children:`Farcaster`}),` as a social option.`]}),`\n`,_jsx(_components.p,{children:`This will enable you to configure Farcaster as a login and account linking option in your app.`}),`\n`,_jsx(Heading,{level:`3`,id:`2-configure-your-app’s-farcaster-integration`,children:`2. Configure your app’s Farcaster integration`}),`\n`,_jsxs(_components.p,{children:[`The following assumes you have set up Privy with your app. If you haven’t, start by following the instructions in the `,_jsx(_components.a,{href:`/basics/get-started/dashboard/create-new-app`,children:_jsx(_components.strong,{children:`Privy Quickstart`})}),` to get your app set up with Privy.`]}),`\n`,_jsxs(_components.p,{children:[`From there, if you’d like users to be able to `,_jsx(_components.a,{href:`/authentication/user-authentication/login-methods/farcaster`,children:_jsx(_components.strong,{children:_jsx(_components.code,{children:`login`})})}),` to your app with their Farcaster account, you can configure `,_jsx(_components.code,{children:`'farcaster'`}),` as an upfront login method in your `,_jsx(_components.strong,{children:_jsx(_components.code,{children:`PrivyProvider`})}),`, like so:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`tsx`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`tsx`,children:_jsxs(_components.code,{language:`tsx`,numberOfLines:`10`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#4EC9B0`},children:`PrivyProvider`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` appId`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`NEXT_PUBLIC_PRIVY_APP_ID`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` config`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // This configures email, farcaster and wallet login for your app.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` appearance:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` loginMethods:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'farcaster'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`...`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`insertTheRestOfYourLoginMethods`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ...`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`insertTheRestOfYourPrivyProviderConfig`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`You can also prompt existing users to link their Farcaster account to their existing account.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`tsx`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`tsx`,children:_jsxs(_components.code,{language:`tsx`,numberOfLines:`8`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`usePrivy`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`} `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '@privy-io/react-auth'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`function`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Page`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`linkFarcaster`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`} `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` usePrivy`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:\" // You may replace this hook with any of the other `link-` hooks to\"})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // link a different account type.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`button`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` onClick`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`linkFarcaster`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Link your Farcaster`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`button`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`3-use-your-farcaster-link-to-power-custom-logic`,children:`3. Use your Farcaster link to power custom logic`}),`\n`,_jsxs(_components.p,{children:[`Once a user has logged in with or linked their Farcaster account, you can find their `,_jsx(_components.strong,{children:_jsx(_components.code,{children:`Farcaster`})}),` object, including their `,_jsx(_components.code,{children:`fid`}),`, `,_jsx(_components.code,{children:`username`}),`, `,_jsx(_components.code,{children:`pfp`}),` and more, in the `,_jsx(_components.a,{href:`/user-management/users/the-user-object`,children:_jsx(_components.strong,{children:_jsx(_components.code,{children:`user`})})}),` object returned by the `,_jsx(_components.code,{children:`usePrivy`}),` hook.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`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 `,_jsx(_components.a,{href:`https://docs.farcaster.xyz/`,children:`Farcaster’s APIs`}),` or `,_jsx(_components.a,{href:`https://neynar.com/`,children:`Neynar`}),` to query and interact with protocol data.`]}),`\n`,_jsx(Heading,{level:`3`,id:`4-optional-refresh-farcaster-info`,children:`4. (Optional) Refresh Farcaster info`}),`\n`,_jsxs(_components.p,{children:[`Sometimes, a user may update their Farcaster profile information (`,_jsx(_components.code,{children:`username`}),`, `,_jsx(_components.code,{children:`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 `,_jsx(_components.a,{href:`/basics/rest-api/setup`,children:`REST API`}),` (`,_jsx(_components.code,{children:`server-auth`}),` coming soon) and hitting the `,_jsx(_components.code,{children:`/api/v1/users/farcaster/refresh`}),` endpoint.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`11`,language:`tsx`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`tsx`,children:_jsxs(_components.code,{language:`tsx`,numberOfLines:`11`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` fetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'https://auth.privy.io/api/v1/users/farcaster/refresh'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` method:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'POST'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` body:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stringify`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` fid:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }),`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` headers:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Authorization:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" `Basic \"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`btoa`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'your-privy-app-id'`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'your-privy-app-secret'`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`)`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'privy-app-id'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'your-privy-app-id'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'content-type'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'application/json'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`If you’re simply looking for the current Privy user object, we recommend using `,_jsx(_components.a,{href:`/user-management/users/managing-users/querying-users#by-farcaster-fid`,children:_jsx(_components.code,{children:`getUserByFarcasterId`})}),`.`]}),`\n`,_jsxs(_components.p,{children:[`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 `,_jsx(_components.code,{children:`fid`}),`.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":"system","config":{},"pageMetadata":{"title":"Login with Farcaster","description":null,"href":"/recipes/farcaster/login"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"1. Enable Farcaster login in your dashboard","slug":"1-enable-farcaster-login-in-your-dashboard","depth":3,"children":[]},{"title":"2. Configure your app’s Farcaster integration","slug":"2-configure-your-app’s-farcaster-integration","depth":3,"children":[]},{"title":"3. Use your Farcaster link to power custom logic","slug":"3-use-your-farcaster-link-to-power-custom-logic","depth":3,"children":[]},{"title":"4. (Optional) Refresh Farcaster info","slug":"4-optional-refresh-farcaster-info","depth":3,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/privy-c2af3412/9a6cfa36ced76db0/welcome.js","/_mintlify/custom/privy-c2af3412/1af79d46bd64cd8b/fullstory.js","/_mintlify/custom/privy-c2af3412/e4d91321024fde21/recipes/recipes-search.js","/_mintlify/custom/privy-c2af3412/d31c5451398ab22c/check-links.js"],"subdomain":"privy-c2af3412","siteName":"Privy Docs","title":"Login with Farcaster - Privy Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-06T22:36:08.414Z","originalFileLocation":"recipes/farcaster/login.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"application-name\" content=\"Privy Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/privy-c2af3412/bJgmnaRQwH8sO8y5/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/privy-c2af3412/bJgmnaRQwH8sO8y5/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/privy-c2af3412/bJgmnaRQwH8sO8y5/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/privy-c2af3412/bJgmnaRQwH8sO8y5/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/privy-c2af3412/bJgmnaRQwH8sO8y5/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/privy-c2af3412/bJgmnaRQwH8sO8y5/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/privy-c2af3412/bJgmnaRQwH8sO8y5/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/privy-c2af3412/bJgmnaRQwH8sO8y5/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/privy-c2af3412/bJgmnaRQwH8sO8y5/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Login with Farcaster - Privy Docs\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Privy Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.privy.io/recipes/farcaster/login\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://assets.privy.io/docs-og.png\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Privy Docs\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://assets.privy.io/docs-og.png\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/privy-c2af3412/bJgmnaRQwH8sO8y5/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Privy Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#010110\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.privy.io/recipes/farcaster/login\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/recipes/farcaster/login.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://www.privy.io/#organization\",\"name\":\"Privy\",\"url\":\"https://www.privy.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://assets.privy.io/docs-og.png\"},\"sameAs\":[\"https://x.com/privy_io\",\"https://github.com/privy-io\"]},{\"@type\":\"WebSite\",\"@id\":\"https://docs.privy.io#website\",\"name\":\"Privy Docs\",\"url\":\"https://docs.privy.io\",\"publisher\":{\"@id\":\"https://www.privy.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.privy.io/recipes/farcaster/login#webpage\",\"url\":\"https://docs.privy.io/recipes/farcaster/login\",\"name\":\"Login with Farcaster\",\"dateModified\":\"2026-11-06T22:36:08.414Z\",\"isPartOf\":{\"@id\":\"https://docs.privy.io#website\"},\"breadcrumb\":{\"@id\":\"https://docs.privy.io/recipes/farcaster/login#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.privy.io/recipes/farcaster/login#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"All recipes\",\"item\":\"https://docs.privy.io/recipes/authentication/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Authentication\",\"item\":\"https://docs.privy.io/recipes/authentication/overview\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Login with Farcaster\",\"item\":\"https://docs.privy.io/recipes/farcaster/login\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.privy.io/recipes/farcaster/login#article\",\"headline\":\"Login with Farcaster\",\"name\":\"Login with Farcaster\",\"url\":\"https://docs.privy.io/recipes/farcaster/login\",\"mainEntityOfPage\":{\"@id\":\"https://docs.privy.io/recipes/farcaster/login#webpage\"},\"image\":\"https://assets.privy.io/docs-og.png\",\"dateModified\":\"2026-11-06T22:36:08.414Z\",\"publisher\":{\"@id\":\"https://www.privy.io/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.privy.io#website\"}}]}\u003c/script>","siteName":"Privy Docs","nav":{"global":null,"tabs":[{"tab":"Basics","pages":[{"title":"Basics","href":"/basics/get-started/about"}]},{"tab":"Wallets","menu":[{"item":"Overview","pages":[{"title":"Overview","href":"/wallets/overview"}]},{"item":"Embedded wallets","pages":[{"title":"Embedded wallets","href":"/wallets/overview/embedded"}]},{"item":"Organization wallets","pages":[{"title":"Organization wallets","href":"/organizations/overview"}]},{"item":"External wallets","pages":[{"title":"External wallets","href":"/wallets/connectors/overview"}]},{"item":"Signatures and transactions","pages":[{"title":"Signatures and transactions","href":"/wallets/signatures-and-transactions"}]},{"item":"Balances and webhooks","pages":[{"title":"Balances and webhooks","href":"/wallets/gas-and-asset-management/assets/overview"}]},{"item":"Gas and fee management","pages":[{"title":"Gas and fee management","href":"/wallets/gas-and-asset-management/gas/overview"}]}],"pages":[{"title":"Wallets","href":"/wallets/overview"}]},{"tab":"Financial flows","menu":[{"item":"Overview","pages":[{"title":"Overview","href":"/financial-flows/overview"}]},{"item":"Deposits","pages":[{"title":"Deposits","href":"/financial-flows/deposits/overview"}]},{"item":"Payouts","pages":[{"title":"Payouts","href":"/financial-flows/payouts/overview"}]},{"item":"Earn","pages":[{"title":"Earn","href":"/wallets/actions/earn/overview"}]},{"item":"Cards","pages":[{"title":"Cards","href":"/financial-flows/cards/overview"}]},{"item":"Trade","pages":[{"title":"Trade","href":"/wallets/actions/swap/overview"}]},{"item":"Monetization","pages":[{"title":"Monetization","href":"/financial-flows/monetization"}]},{"item":"Treasury management","pages":[{"title":"Treasury management","href":"/treasury-management/overview"}]},{"item":"Private transactions","pages":[{"title":"Private transactions","href":"/financial-flows/private-transactions"}]}],"pages":[{"title":"Financial flows","href":"/financial-flows/overview"}]},{"tab":"Controls and policies","menu":[{"item":"Controls","pages":[{"title":"Controls","href":"/controls/overview"}]},{"item":"Policies","pages":[{"title":"Policies","href":"/controls/policies/overview"}]},{"item":"Manual approvals","pages":[{"title":"Manual approvals","href":"/controls/dashboard/overview"}]}],"pages":[{"title":"Controls and policies","href":"/controls/overview"}]},{"tab":"Identity","menu":[{"item":"Authentication","pages":[{"title":"Authentication","href":"/authentication/overview"}]},{"item":"Users","pages":[{"title":"Users","href":"/user-management/users/overview"}]},{"item":"KYC and KYB","pages":[{"title":"KYC and KYB","href":"/kyc-kyb/overview"}]}],"pages":[{"title":"Identity","href":"/authentication/overview"}]},{"tab":"Security","pages":[{"title":"Security","href":"/security/overview"}]},{"tab":"Recipes","pages":[{"title":"Recipes","sidebarTitle":"Overview","mode":"wide","href":"/recipes/overview"},{"group":"All recipes","pages":[{"group":"Authentication","expanded":false,"pages":[{"sidebarTitle":"Overview","title":"Authentication","href":"/recipes/authentication/overview"},{"title":"Setting up SMS or WhatsApp login","href":"/recipes/dashboard/login-methods/sms-whatsapp"},{"title":"Guest accounts","href":"/recipes/react/guest-accounts"},{"title":"Login with Apple","description":null,"href":"/recipes/swift/apple"},{"title":"Login with Farcaster","href":"/recipes/farcaster/login"},{"title":"Login with Lens","description":null,"href":"/recipes/lens"},{"title":"Use tokens from OAuth providers","href":"/recipes/react/oauth-tokens"},{"title":"Migrating embedded wallets from Alchemy to Privy","href":"/recipes/migrating-embedded-wallets-from-alchemy"},{"title":"Migrating JWT authentication from Alchemy to Privy","href":"/recipes/migrating-jwt-authentication-from-alchemy"},{"title":"Using Supabase as an authentication provider","href":"/recipes/authentication/using-supabase-for-custom-auth"},{"title":"Worldcoin mini app SIWE with Privy","href":"/recipes/react/worldcoin-siwe-guide"},{"title":"Chrome extension authentication","href":"/recipes/react/chrome-extension"},{"title":"Mocking tokens for testing","href":"/recipes/mock-jwt"},{"title":"Configure cookies","href":"/recipes/react/cookies"},{"title":null,"href":"/recipes/using-test-accounts"},{"title":"Migrating sign in with Apple users for an Apple team transfer","href":"/recipes/apple-team-migration"}]},{"group":"Wallet infrastructure","expanded":false,"pages":[{"sidebarTitle":"Overview","title":"Wallet infrastructure","href":"/recipes/wallet-infrastructure/overview"},{"title":"Hierarchical deterministic (HD) wallets","href":"/recipes/hd-wallets"},{"title":"Pregenerating wallets","href":"/recipes/pregenerate-wallets"},{"sidebarTitle":"Agentic wallets","title":"Agentic wallets","href":"/recipes/agent-integrations/agentic-wallets"},{"title":"Server-side user wallets","href":"/recipes/wallets/server-side-user-wallets"},{"title":"Enabling users or servers to execute transactions","href":"/recipes/wallets/user-and-server-signers"},{"title":"Using passkeys with wallets","href":"/recipes/passkey-server-wallets"},{"title":"Policy-based MFA","href":"/recipes/policy-based-mfa"},{"title":"Using stateful policies with Privy","href":"/recipes/using-stateful-policies"},{"title":"Migrating wallets from on-device to TEEs","href":"/recipes/tee-wallet-migration-guide"},{"title":"Tier 1 wallet integration","href":"/recipes/tier-1-wallet-integration"},{"title":"Tier 2 wallet integration","href":"/recipes/tier-2-wallet-integration"},{"title":"Custom account abstraction implementation","href":"/recipes/account-abstraction/custom-implementation"},{"title":"Storing smart account addresses","href":"/recipes/account-abstraction/address"},{"title":"Integrating smart accounts with wagmi","href":"/recipes/account-abstraction/wagmi"},{"title":"Create a smart wallet on iOS and Android","href":"/recipes/account-abstraction/native-mobile"},{"title":"2-of-2 quorum: user and server as co-signers","href":"/recipes/wallets/two-of-two-server-in-the-loop"}]},{"group":"Account funding","expanded":false,"pages":[{"sidebarTitle":"Overview","title":"Account funding","href":"/recipes/account-funding/overview"},{"title":"Stripe embedded onramp","href":"/recipes/stripe-embedded-onramp"},{"title":"Using Privy and Due for on/off ramping","href":"/recipes/due-on-off-ramp"},{"title":"Onramping to MXNB with Juno","href":"/recipes/bitso-mxnb-onramp"}]},{"group":"Transactions \u0026 signing","expanded":false,"pages":[{"group":"EVM","expanded":false,"pages":[{"sidebarTitle":"Overview","title":"EVM transactions and signing","href":"/recipes/evm/overview"},{"title":"Sending OUSD (or other ERC-20s)","href":"/recipes/send-ousd"},{"title":"Sending USDC (or other ERC-20s)","href":"/recipes/send-usdc"},{"title":"Sending batch transactions","href":"/recipes/batch-transactions"},{"title":"Speeding up transactions on EVM chains","href":"/recipes/speeding-up-transactions"},{"sidebarTitle":"Flashblocks","title":"Using Flashblocks with Privy","href":"/recipes/evm/flashblocks"},{"title":"Integrating with EIP-7702","href":"/recipes/react/eip-7702"},{"title":"ERC-1271 signatures","href":"/recipes/evm/erc-1271-signatures"}]},{"group":"Solana","expanded":false,"pages":[{"sidebarTitle":"Overview","title":"Solana transactions and signing","href":"/recipes/solana/overview"},{"title":"Getting started with Privy and Solana","href":"/recipes/solana/getting-started-with-privy-and-solana"},{"title":"Sending a SOL transaction","href":"/recipes/solana/send-sol"},{"title":"Sending SPL tokens","href":"/recipes/solana/send-spl-tokens"}]},{"group":"Bitcoin","expanded":false,"pages":[{"title":"Using Spark BTC with Privy wallets","href":"/recipes/spark-btc-guide"}]}]},{"group":"Gas sponsorship","expanded":false,"pages":[{"title":"Custom gas sponsorship rate limits","href":"/recipes/gas-sponsorship-rate-limits"},{"title":"Integrating OneBalance","href":"/recipes/one-balance"},{"title":"Sponsor gas on Tron with Transatron","sidebarTitle":"Sponsor gas on Tron with Transatron","href":"/recipes/tron/transatron"}]},{"group":"Treasury","expanded":false,"pages":[{"sidebarTitle":"Overview","title":"Treasury","href":"/recipes/wallets/treasury-overview"},{"sidebarTitle":"Treasury","title":"Treasury setup","href":"/recipes/wallets/wallet-infrastructure"},{"sidebarTitle":"Execution wallets","title":"Execution wallets","href":"/recipes/wallets/execution-wallets"}]},{"group":"Swaps","expanded":false,"pages":[{"title":"Swapping crypto using Privy and 0x","href":"/recipes/swap-with-0x"},{"title":"Swapping crypto using Privy and Bebop","href":"/recipes/evm/bebop-swap-guide"}]},{"group":"Payments","expanded":false,"pages":[{"title":"Pay with WalletConnect pay","href":"/recipes/walletconnect-pay"},{"title":"Bridge cards","href":"/recipes/bridge-cards"},{"title":"Send to Africa with Zuba","href":"/recipes/send-to-africa"},{"title":"Accept stablecoin payments with automatic fiat conversion","href":"/recipes/stablecoin-payments-bridge-stripe"}]},{"group":"Trading","expanded":false,"pages":[{"sidebarTitle":"Overview","title":"Trading","href":"/recipes/trading/overview"},{"title":"Polymarket builder codes","href":"/recipes/polymarket-guide"},{"title":"Trading apps resource page","href":"/recipes/trading-apps-homepage"},{"sidebarTitle":"Server-side access","title":"Enabling server-side access to user wallets","href":"/recipes/wallets/session-signer-use-cases/server-side-access"},{"title":"Bankr Twitter bot guide","href":"/recipes/agent-integrations/bankr-bot-guide"},{"title":"Building a Telegram trading bot","href":"/recipes/telegram-bot"},{"sidebarTitle":"Limit orders","title":"Using signers to execute limit orders with wallets","href":"/recipes/wallets/session-signer-use-cases/limit-orders"},{"title":"Trade on Lighter","href":"/recipes/lighter-guide"}]},{"group":"External wallets","expanded":false,"pages":[{"title":"Wallet list configuration recipes","sidebarTitle":"Wallet list recipes","href":"/recipes/react/wallet-list-configurations"},{"title":"Configuring external connectors","href":"/recipes/react/configuring-external-connectors"},{"title":"Using Solana standard wallets","href":"/recipes/solana/standard-wallets"},{"title":"Integrating Solana mobile wallet adapter","href":"/recipes/solana/adding-solana-mwa"}]},{"group":"Tempo","pages":[{"title":"Overview","href":"/recipes/tempo/overview"},{"title":"Using Tempo with Privy","href":"/recipes/tempo/send-transactions"},{"title":"Receive policies","href":"/recipes/tempo/receive-policies"},{"title":"Deposit from Stellar to Tempo","href":"/recipes/tempo/stellar-deposit-address"}]},{"group":"Hyperliquid","expanded":false,"pages":[{"title":"Quickstart","href":"/recipes/hyperliquid-guide"},{"title":"Agent wallets","href":"/recipes/hyperliquid/agents-and-subaccounts"},{"title":"Executing trades","href":"/recipes/hyperliquid/trading-patterns"},{"title":"Policies","href":"/recipes/hyperliquid/policies-and-offline-actions"},{"title":"HyperEVM","href":"/recipes/hyperliquid/hyperevm"},{"group":"Advanced","expanded":false,"pages":[{"title":"Client-side SDKs","href":"/recipes/hyperliquid/client-side-usage"},{"title":"Subaccounts","href":"/recipes/hyperliquid/subaccounts"},{"title":"Builder codes","href":"/recipes/hyperliquid/builder-codes"}]}]},{"group":"Earn and borrow","expanded":false,"pages":[{"title":"Overview","href":"/recipes/yield/overview"},{"title":"Reading Earn vault totals onchain","sidebarTitle":"Earn totals onchain","href":"/recipes/yield/earn-onchain-totals"},{"sidebarTitle":"Aave","title":"Integrating Aave with Privy","href":"/recipes/yield/aave-guide"},{"sidebarTitle":"Ethena","title":"Integrating Ethena with Privy","href":"/recipes/yield/ethena-guide"},{"sidebarTitle":"Sky savings","title":"Integrating Sky savings with Privy","href":"/recipes/yield/sky-savings-guide"},{"sidebarTitle":"Kamino","title":"Integrating Kamino with Privy","href":"/recipes/yield/kamino-guide"},{"sidebarTitle":"Pods","title":"Integrating Pods with Privy","href":"/recipes/yield/pods-guide"},{"sidebarTitle":"Yield.xyz AgentKit","title":"Using Privy server wallets with yield.xyz AgentKit","href":"/recipes/yield/yield-agentkit-guide"},{"sidebarTitle":"Ground","title":"Integrating Ground gtokens with Privy","href":"/recipes/yield/ground-guide"},{"title":"Borrow with Morpho","sidebarTitle":"Borrow with Morpho","href":"/recipes/yield/morpho-borrow"},{"sidebarTitle":"Dolomite USD1 markets","title":"Earn yield with markets powered by Dolomite","href":"/recipes/community/dolomite-guide"}]},{"group":"AI \u0026 agents","expanded":false,"pages":[{"title":"Overview","href":"/recipes/agent-integrations/overview"},{"sidebarTitle":"Agent CLI","title":"Agent CLI","href":"/recipes/agent-integrations/agent-cli"},{"sidebarTitle":"Agent wallet access via CLI/MCP/Skills","title":"Authorized wallet access for self-hosted agents","href":"/recipes/agent-integrations/agent-authorization"},{"sidebarTitle":"AI robo-advisor agent","title":"Build a robo-advisor with Hermes agents and Robinhood chain","href":"/recipes/agent-integrations/robo-advisor-agent"},{"title":"Machine Payments Protocol (MPP)","href":"/recipes/agent-integrations/mpp"},{"title":"x402","href":"/recipes/agent-integrations/x402"},{"title":"Sanctions screening for x402 payments","href":"/recipes/agent-integrations/x402-sanctions-screening"},{"title":"Amazon Bedrock AgentCore","href":"/recipes/agent-integrations/agentcore-payments"},{"title":"OpenClaw agentic wallets","href":"/recipes/agent-integrations/openclaw-agentic-wallets"},{"title":"Privy Agent on auto.exchange","href":"/recipes/agent-integrations/auto-exchange-privy-agent"},{"title":"Virtuals EconomyOS with Privy wallets","sidebarTitle":"Virtuals EconomyOS","href":"/recipes/agent-integrations/virtuals-economyos"}]},{"group":"Social \u0026 mini apps","expanded":false,"pages":[{"title":"Build World mini apps with Privy","href":"/recipes/world/mini-apps"},{"title":"Building a Farcaster mini app","href":"/recipes/farcaster/mini-apps"},{"title":"Writing to Farcaster","href":"/recipes/farcaster/writes"}]},{"group":"UI customization and whitelabeling","expanded":false,"pages":[{"title":"Configuring wallet confirmation modals","href":"/recipes/react/manage-wallet-UIs"},{"title":"Whitelabel","href":"/recipes/react/whitelabel"},{"title":"Setting a system theme for the Privy modal","href":"/recipes/system-theme"}]},{"group":"Dashboard","expanded":false,"pages":[{"title":"Configure account transfer","href":"/recipes/dashboard/account-transfer"},{"title":"Recovering assets from a dashboard wallet","href":"/recipes/dashboard/recovering-assets"},{"title":"Bot traffic mitigation","href":"/recipes/dashboard/preventing-bots"},{"title":"Configure allowed URLs","href":"/recipes/dashboard/allowed-domains"},{"title":"Configure allowed OAuth redirect URLs","href":"/recipes/react/allowed-oauth-redirects"},{"title":"Managing your allowlist with Airtable","href":"/recipes/dashboard/airtable"},{"title":"Customize your application","href":"/recipes/dashboard/customization"},{"title":"Single sign-on","href":"/basics/get-started/dashboard/sso"}]},{"group":"Data","expanded":false,"pages":[{"title":"Analyze Privy data with Stripe","href":"/recipes/data/stripe"}]},{"group":"Mobile","expanded":false,"pages":[{"title":"Exporting wallet keys from mobile apps","href":"/recipes/mobile-key-export"},{"title":"Mobile SDK breadcrumbs","href":"/recipes/mobile-breadcrumbs"},{"title":"Handle account transfer in your mobile app","href":"/recipes/mobile-account-transfer"},{"title":"Read auth state from a background process","href":"/recipes/swift/background-auth-state"},{"title":"Deeplinking Solana wallets in React Native applications","href":"/recipes/react-native/deeplinking-wallets"},{"title":null,"href":"/recipes/react-native/clearing-state-on-fresh-installs"},{"title":"Require MFA on every app session","href":"/recipes/react-native/mfa-on-app-session"},{"title":"OAuth with Capacitor","href":"/recipes/capacitor-oauth"}]},{"group":"Ecosystem","expanded":false,"pages":[{"title":null,"href":"/recipes/ecosystem/abstract-global-wallet"}]},{"group":"Integrations","expanded":false,"pages":[{"title":"Integrating the Base app","href":"/recipes/react/external-wallets/base-app"},{"sidebarTitle":"Base sub accounts","title":"Using Base sub accounts","href":"/recipes/react/external-wallets/base-sub-accounts"},{"title":"Integrating Base builder codes","href":"/recipes/evm/base-builder-codes"}]},{"group":"Tooling","expanded":false,"pages":[{"title":"Using the vanilla JavaScript SDK","href":"/recipes/core-js"},{"title":"Integrating Flashbots protect","href":"/recipes/flashbots-protect"},{"title":"Integrating with tRPC","href":"/recipes/trpc"},{"title":"Optimize your setup","href":"/recipes/dashboard/optimizing"}]},{"group":"Community written guides","expanded":false,"pages":[{"title":"Getting started with Privy and TON (Vite + React)","href":"/recipes/community/ton-vite-react"},{"title":"Swapping crypto using Privy and Omniston","href":"/recipes/community/ton-omniston-swap"}]}]}]},{"tab":"API reference","pages":[{"title":"API reference","href":"/api-reference/introduction"}]}]},"basePath":"","title":"Login with Farcaster - Privy Docs","buildId":"dpl_FWZhTb2vab28gFGFH4ojka6qEznQ","deploymentId":"dpl_FWZhTb2vab28gFGFH4ojka6qEznQ","dynamics":[],"chunks":[]}