Skip to main content
Verify a Sign In With Farcaster message. Your app should call this function and check that it succeeds after reading the message and signature provided by the user’s Farcaster wallet over the Connect channel. Returns the parsed Sign in With Farcaster message, the user’s fid, and whether the verification succeeded.
const { data, success, fid } = await appClient.verifySignInMessage({
  nonce: 'abcd1234',
  domain: 'example.com',
  message: 'example.com wants you to sign in with your Ethereum account…',
  signature: '0x9335c3055d47780411a3fdabad293c68c84ea350a11794cd11fd51b…',
  acceptAuthAddress: true,
});

Parameters

ParameterTypeDescriptionRequired
domainstringDomain of your application. Must match the domain in the provided SIWF message.Yes
noncestringA custom nonce. Must match the nonce in the provided SIWF message.Yes
messagestring or SiweMessageThe Sign in With Farcaster message to verify. This may be either a string or a parsed SiweMessage. Your app should read this value from the Connect channel once the request is completed.Yes
signatureHexSignature provided by the user’s Farcaster wallet. Your app should read this from the Connect channel once the request is completed.Yes
acceptAuthAddressbooleanPass true to accept an auth address signature in addition to a custody address signature.No

Returns

{
    data: SiweMessage,
    success: boolean,
    fid: number
    isError: boolean
    error: Error
}
ParameterDescription
dataParsed SIWF message, as a SiweMessage object.
successTrue if the provided signature is valid.
fidFID of the user.
isErrorTrue when an error has occurred.
errorError instance.