mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 04:27:21 +00:00
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()`
|
||||
|
||||
To retrieve the current user, use the `me` method:
|
||||
|
||||
Reference in New Issue
Block a user