# Log in with Ethos

This integration is powered by [Privy](https://www.privy.io/), allowing users to sign in with the Ethos Everywhere wallet.

You can find a working reference implementation here:

* Example app: [https://login-example.ethos.network](https://login-example.ethos.network/)
* Source code: <https://github.com/trust-ethos/log-in-with-ethos>

### 1. Prerequisites

To integrate Log in with Ethos, you need:

* A Privy account
* An application configured in the [Privy Developer Dashboard](https://dashboard.privy.io/account)
* An Ethos account (for testing login)

***

### 2. Configure Privy

#### Step 1 — Create a Privy app

1. Go to Privy Developer Dashboard
2. [Create a new application (or use an existing one)](https://docs.privy.io/basics/get-started/dashboard/create-new-app)
3. Copy your APP ID

You will use this on the client side when initializing Privy.

#### Step 2 — Enable integration with Ethos

Inside your Privy dashboard:

1. Navigate to Global wallet → Integrations
2. Find **Ethos Network** and enable it.

### 3. Install Privy in your app

[Add Privy’s SDK to your project](https://docs.privy.io/basics/react/installation).

***

### 4. Initialize Privy

Use your Privy App ID to initialize Privy in your React app:

```jsx
import { PrivyProvider } from '@privy-io/react-auth';

<PrivyProvider
  appId={import.meta.env.PUBLIC_PRIVY_APP_ID}
  config={{
    loginMethodsAndOrder: {
      primary: ['privy:cm5l76en107pt1lpl2ve2ocfy'],
    },
  }}
>
  <App />
</PrivyProvider>
```

***

### 5. Trigger Login with Ethos

Inside your app:

```jsx
import { usePrivy } from '@privy-io/react-auth';

const { login } = usePrivy();

<button onClick={() => login()}>Sign in with Ethos</button>
```

<div align="center" data-with-frame="true"><figure><img src="https://1434297183-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8s7uNMHFdiXlOzKSzKOH%2Fuploads%2FhVIrHoqkc60NM4kA6rRS%2FCleanShot%202025-12-02%20at%2000.33.48%402x.png?alt=media&#x26;token=b4d8ee7f-765e-46d5-848c-f7bd23b28185" alt=""><figcaption></figcaption></figure></div>

### Example app

A fully working implementation demonstrating the entire flow:

* Live Demo: [https://login-example.ethos.network](https://login-example.ethos.network/)
* GitHub Repo: <https://github.com/trust-ethos/log-in-with-ethos>
