Neynar Documentation

Hook for Reading the Sign in With Farcaster Message

Hook for reading the Sign in With Farcaster message and signature used to authenticate the user. If you’re providing the message and signature to a backend API, you may want to use this hook.

import { useSignInMessage } from '@farcaster/auth-kit';

function App() {
  const { message, signature } = useSignInMessage();

return (
    <div>
      <p>You signed: {message}</p>
      <p>Your signature: {signature}</p>
    </div>
  );
}

Returns

{
  message: string;
  signature: Hex;
}
Parameter Description
message SIWE message signed by the user.
signature Signature produced by the user’s Farcaster wallet.