feat: Add documentation for auth.logout method in SDK usage

This commit is contained in:
Jonas Perusquia Morales
2025-12-04 14:48:11 -06:00
parent 2e6b95e484
commit 65e17db2a2

View File

@@ -266,6 +266,16 @@ const { data } = await api.auth.register("password", {
}); });
``` ```
### `auth.logout()`
To log out the current user and clear the stored token, use the `logout` method:
```ts
await api.auth.logout();
```
This method takes no parameters. It sends a request to the logout endpoint and clears the authentication token. Returns a `Promise<void>`.
### `auth.me()` ### `auth.me()`
To retrieve the current user, use the `me` method: To retrieve the current user, use the `me` method: