# 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="/files/dTQUaoyiaDgvNiFGJhUk" 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>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.ethos.network/api-documentation/log-in-with-ethos.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
