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

# Authentication

> Authenticate using Sign-In with Ethereum (SIWE)

The protocol uses **Sign-In with Ethereum (SIWE)** for secure authentication.

The SDK automatically handles login when you attempt to perform a protected action (like minting or depositing).
However, you can also manage the session manually.

```typescript theme={null}
// Explicitly login (signs a SIWE message)
await sdk.login();

// Check if a session exists
const session = await sdk.getSession();

if (session) {
    console.log("User is authenticated:", session.user);
}
```
