Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.neynar.com/llms.txt

Use this file to discover all available pages before exploring further.

Hook for reading information about the authenticated user. You can use this hook to read the authenticated user’s profile information from other components inside your app.
import { useProfile } from '@farcaster/auth-kit';

function App() {
  const {
    isAuthenticated,
    profile: { username, fid, bio, displayName, pfpUrl },
  } = useProfile();

  return (
    <div>
      {isAuthenticated ? (
        <p>
          Hello, {username}! Your fid is: {fid}
        </p>
      ) : (
        <p>You're not signed in.</p>
      )}
    </div>
  );
}

Returns

  {
    isAuthenticated: boolean;
    profile?: {
        fid?: number;
        username?: string;
        bio?: string;
        displayName?: string;
        pfpUrl?: string;
        custody?: Hex;
        verifications?: Hex[];
    },
  };
ParameterDescription
isAuthenticatedTrue when the user is logged in.
profile.fidUser’s Farcaster ID.
profile.usernameUser’s username.
profile.bioUser’s bio text.
profile.displayNameUser’s display name.
profile.pfpUrlUser’s profile picture URL.
profile.custodyUser’s FID custody address.
profile.verificationsList of user’s verified addresses.