logoutApi - n1lby73/industrial-IOT GitHub Wiki
Overview
The Logout API endpoint logs the user out of the system by invalidating the JSON Web Token (JWT) and refresh token.
Endpoint URL
- URL:
https://industrialiot.onrender.com/api/logout - Method:
POST
Request Parameters
- Headers:
- Authorization:
Bearer <ACCESS_TOKEN> - Content-Type:
application/json
- Authorization:
- Body Parameters: None
Responses
- Success Response:
-
Status Code: 200 OK
-
Response Body:
{ "success": "logout successful", }- Description: Indicates successful logout from the system.
-
Status Code: 500 Internal Server Error
- Response Body:
{ "error": "logout unsuccessful", "details": "<ERROR_DETAILS>" } - Description: Indicates a server error during logout process.
- Response Body:
-
Usage
- Request Method:
POST - Endpoint URL:
https://industrialiot.onrender.com/api/logout - Header:
{ Authorization: Bearer <ACCESS_TOKEN> Content-Type: application/json }
NOTE: Logging out would not work if email is not verified