Logout API
Endpoint
POST /auth/logoutPayload
Logout API doesn't require any payload but just an empty body; {}. This can be necessary for the web browser because browser handles all the cookies itself according to its policies. In the response, the API will remove the session-token and is_logged_in cookies headers from the response and the browser will automatically log the user out. But in mobile application, since the cookies will be handled manually, the developer can directly log the user out instead of calling the logout API.
Response
1
2
3
4
{
"success": true,
"msg": "You are Logged out successfully !"
}