Merge pull request #319 from jonaspm/docs/add-auth-logout

feat: Add documentation for auth.logout method in SDK usage
This commit is contained in:
dswbx
2025-12-04 22:06:09 +01:00
committed by GitHub

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()`
To retrieve the current user, use the `me` method: