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

# Auth

> User authentication via Supabase-backed endpoints

Base path: `/v1/auth`

### POST /signup

Create a user.

Request

```json theme={null}
{
  "email": "user@example.com",
  "password": "secret",
  "metadata": {"name": "Jane"}
}
```

Response

```json theme={null}
{
  "user": {"id": "...", "email": "user@example.com"}
}
```

### POST /signin

Sign in and receive tokens.

Request

```json theme={null}
{ "email": "user@example.com", "password": "secret" }
```

Response

```json theme={null}
{
  "access_token": "...",
  "refresh_token": "...",
  "user": {"id": "...", "email": "user@example.com"}
}
```

### POST /signout

Invalidate the current session.

Headers: `Authorization: Bearer <access_token>`

Response

```json theme={null}
{ "message": "Signed out successfully" }
```

### GET /me

Return the current authenticated user.

Headers: `Authorization: Bearer <access_token>`

Response

```json theme={null}
{ "user": {"id": "...", "email": "..."} }
```

### POST /sync

Ensure a user exists in DB and create a default project if none exists.

Headers: `Authorization: Bearer <access_token>`

Response

```json theme={null}
{
  "user": {"id": "...", "email": "..."},
  "project": {"id": "...", "name": "My First Project", "slug": "my-first-project"}
}
```
