Skip to main content
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;
}
ParameterDescription
messageSIWE message signed by the user.
signatureSignature produced by the user’s Farcaster wallet.