---
title: "Usage"
weight: 30
description: "Day-to-day use of SmartAuth: dashboard, token, device and log management, and the user tab."
source_hash: "d628a8a7"
---

# Usage

The SmartAuth module is accessible from the **Tools > SmartAuth** menu in the left sidebar of Dolibarr.

## Dashboard

The module's homepage displays a dashboard with four key indicators:

- **Active tokens** -- Total number of currently valid tokens (access + refresh), with the 7-day trend
- **Logged-in users** -- Number of distinct users having at least one active token
- **Rate limit blocks** -- Number of attempts blocked in the last 24 hours and number of IP addresses concerned
- **Refresh success rate** -- Percentage of successful token refreshes in the last 24 hours

![SmartAuth dashboard with the four security indicators](screenshots/tableau-de-bord.webp)

### Security alerts

The dashboard automatically displays alerts when it detects:

- **Replay attacks** -- Token families have been revoked following the suspicious reuse of a refresh token
- **DDoS attempts** -- An IP address made more than 50 failed attempts in one hour
- **Brute force** -- A user account suffered more than 10 failed login attempts in one hour

### Top users

The dashboard shows the 10 most active users with the number of tokens, the number of devices and the date of last activity.

### Quick links

The dashboard offers direct access to:

- Token management
- Logs
- Configuration

### Additional statistics

The right side of the dashboard displays:

- **Recent blocks** -- The latest rate limiting blocks with the IP address, the action and the delay
- **Token family statistics** -- Active families, revoked families, average refreshes and detected replay attacks

## Token management

Accessible from **Tools > SmartAuth > Tokens**, this page lists all active authentication tokens.

![List of active tokens with connection information](screenshots/liste-jetons.webp)

For each token, you can view:

- The token identifier
- The associated application
- The linked user or company
- The creation date
- The date of last use
- The IP address of the last connection
- The expiry date

### Revoking a token

To revoke a token and log out the associated device:

1. Find the token in the list
2. Click the revocation action
3. Confirm the revocation

Revocation is immediate: the device is logged out and will have to re-authenticate.

## Device management

Accessible from **Tools > SmartAuth > Devices**, this page lists all registered devices.

![List of devices registered in SmartAuth](screenshots/liste-peripheriques.webp)

For each device, you can:

- **Rename** -- Assign a custom name to ease identification (example: "Jean's phone", "Warehouse tablet")
- **View history** -- See the device's latest activity
- **Revoke** -- Log out the device and invalidate all its tokens

## Logs

Accessible from **Tools > SmartAuth > Logs**, this page displays the history of connections and API calls.

![List of authentication logs with the details of each request](screenshots/liste-journaux.webp)

The logs contain:

- The date and time of the request
- The HTTP method and the endpoint
- The response status
- The associated user
- The source IP address

> **Warning**: Log collection must be enabled in the [configuration](/smartauth/configuration) (option SMARTAUTH_COLLECT_LOGS) for entries to appear.

## User tab

SmartAuth adds a **SmartAuth** tab to each Dolibarr user record.

![SmartAuth tab in the user record showing tokens and history](screenshots/onglet-utilisateur.webp)

This tab displays:

- The user's latest API tokens with a link to the full list
- The history of connections made by this user
