Skip to content

signIn

Request a Sign in with Farcaster (SIWF) credential from the user.

See the guide on authenticating users.

signing in a user

A users opens an app and is automatically signed in

Usage

import { sdk } from '@farcaster/frame-sdk'
 
await sdk.actions.signIn({ 
  nonce,
  acceptAuthAddress: true
})

Parameters

nonce

  • Type: string

A random string used to prevent replay attacks, at least 8 alphanumeric characters.

acceptAuthAddress

  • Type: boolean

Whether an Auth Address signed message is acceptable. Defaults to false to maintain backwards compatibility, though applications should set this to true for the best user experience assuming their verification method supports it.

Return Value

The SIWF message and signature.

type SignInResult = {
  signature: string;
  message: string;
}