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
  • 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.

Usage

  1. Request Method: POST
  2. Endpoint URL: https://industrialiot.onrender.com/api/logout
  3. Header:
    {
      Authorization: Bearer <ACCESS_TOKEN>
      Content-Type: application/json
    }
    

NOTE: Logging out would not work if email is not verified