logout()
Log out a logged in user.
- Javascript
- Go
- PHP
- API
const { user, error } = await kontenbase.auth.logout()
Name | Type | Description |
---|---|---|
res.user | object | Response for data user |
res.token | string | Response for data token |
res.status | number | Response for status code |
res.statusText | string | Response for status message |
res.error | object | Response for error occurred |
info
Using this method in browser will also remove the saved token in localStorage
.
resp, err := client.Auth.Logout()
Response
Name | Type | Description |
---|---|---|
resp.User | map[string]interface{} | Response for data user |
resp.Token | string | Response for data token |
resp.Status | int | Response for status code |
resp.StatusText | string | Response for status message |
$res = $kontenbase->auth->logout();
Response
Name | Type | Description |
---|---|---|
$res['user'] | object | Response for data user |
$res['token'] | string | Response for data token |
$res['status'] | integer | Response for status code |
$res['statusText'] | string | Response for status message |
$res['error'] | object | Response for error occurred |
[POST]
https://api.kontenbase.com/query/api/v1/API_KEY/auth/logout
note
- After logout,
token
set in the header will no longer be valid for authentication