mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-15 20:17:22 +00:00
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:
@@ -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:
|
||||||
|
|||||||
Reference in New Issue
Block a user