Legacy React Native implementation guide for Sign in with Neynar (SIWN) integration in Farcaster apps
yarn add @neynar/react-native-signin
clientId
apiKey
00b75745-xxxx-xxxx-xxxx-xxxxxxxxxxxx
import {NeynarSigninButton, ISuccessMessage} from "@neynar/react-native-signin"; const NEYNAR_API_KEY = ''; const NEYNAR_CLIENT_ID = ''; const SigninScreen = () => { const handleSignin = async (data: ISuccessMessage) => { console.log(`User with fid -> ${data.fid} can use signer -> ${data.signer_uuid} to interact with farcaster`) }; const handleError = (err) => { console.log(err) } return (<NeynarSigninButton apiKey={NEYNAR_API_KEY} clientId={NEYNAR_CLIENT_ID} successCallback={handleSignin} errorCallback={handleError}/>); }; export default SigninScreen;
interface ISuccessMessage { fid: string; is_authenticated: true; signer_uuid: string; }
Was this page helpful?