> ## Documentation Index
> Fetch the complete documentation index at: https://docs.neynar.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Auth client

[![NPM Version](https://img.shields.io/npm/v/@farcaster/auth-client)](https://www.npmjs.com/package/@farcaster/auth-client)

The `@farcaster/auth-client` library provides a framework agnostic client for Farcaster Auth. If you're not using React, want greater customizability, or want to interact with the Farcaster Auth relay directly, you can use the Auth client library to build your own Sign in With Farcaster flow.

## Getting Started

### Installation

Install the Auth client and its peer dependency [viem](https://viem.sh/).

```sh theme={"system"}
npm install @farcaster/auth-client viem
```

**Note:** This is a low level client library. If you're using React, take a look at [auth-kit](/farcaster/auth-kit) instead.

### Create a client

Set up a client with a relay server URL and Ethereum connector.

```tsx theme={"system"}
import { createAppClient, viemConnector } from '@farcaster/auth-client';

const appClient = createAppClient({
  relay: 'https://relay.farcaster.xyz',
  ethereum: viemConnector(),
});
```

Depending on the type of app you're building, you may use an `AppClient` or a `WalletClient`. If you're building a connected app and logging in users, use an *app client*. If you're building a Farcaster wallet app, use a *wallet client*.

### Consume actions

Now that your client is set up, you can use it to interact with Farcaster Auth actions.

```tsx theme={"system"}
const { data: { channelToken } } = await appClient.createChannel({
    siweUri: "https://example.com/login",
    domain: "example.com";
});

const status = await appClient.watchStatus({
    channelToken,
});
```
