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

# Authentication API Reference

### `appboxo.login(optionalProps)`

Sends a message to native client to open confirm modal with default confirmation message. Upon confirmation it sends request to platform and returns resolved authentication token promise to miniapp.

**Parameters**

* `optionalProps` *optional* Props to extend default login behavior

**optionalProps**

* `postConfirmCallback` *optional* Callback that is being called after confirm modal resolves

**Example**

```js theme={"system"}
try {
  const {
    // token string
    token
  } = await appboxo.login({
    postConfirmCallback: (isConfirmed) => { console.log('Confirmation status: ', isConfirmed) }
  });
} catch (error) {
  // Handling an error
}
```

### `appboxo.logout()`

Sends a message to native client to clear authentication tokens.
