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

# AuthResponse

> Estructura de respuesta para verificación de autenticación

# AuthResponse

Interface estándar retornada por `checkLogin` cuando consultas el estado de un PIN.

## Estructura

```typescript theme={null}
interface AuthResponse {
  success: boolean;
  verified: boolean;
  message?: string;
  token?: string;
  refreshToken?: string;
  user?: User;
}
```

## Propiedades

### success

Indica si la operación HTTP fue procesada correctamente.

```typescript theme={null}
success: boolean;
```

### verified

Indica si el PIN ya fue verificado por WhatsApp.

```typescript theme={null}
verified: boolean;
```

### message

Mensaje descriptivo para estados intermedios o informativos.

```typescript theme={null}
message?: string;
```

### token

JWT de acceso, disponible solo cuando `verified` es `true`.

```typescript theme={null}
token?: string;
```

### refreshToken

Token de refresco, disponible solo cuando `verified` es `true`.

```typescript theme={null}
refreshToken?: string;
```

### user

Datos del usuario autenticado.

```typescript theme={null}
user?: User;
```

## Ejemplos

### Respuesta pendiente

```json theme={null}
{
  "success": true,
  "verified": false,
  "message": "Login pendiente"
}
```

### Respuesta verificada

```json theme={null}
{
  "success": true,
  "verified": true,
  "token": "eyJhbGciOiJIUzI1NiIs...",
  "refreshToken": "eyJhbGciOiJIUzI1NiIs...",
  "user": {
    "id": "123",
    "name": "Juan",
    "phone": "+1234567890",
    "roles": ["user"]
  }
}
```

## Vease tambien

* [User interface](/backend/interfaces/user)
* [CamarauthClient](/backend/classes/camarauth-client)
