lowcoder-org/lowcoder

[FEAT]: Logout not working as expected when Logout API end point is used manually

Closed this issue · 2 comments

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

LOWCODER_CE_SELFHOST_TOKEN is not being forwarded as Params when Logout API call is Posted manually. So, user is not logged out. This token/cookie is not being sent from FE, so BE never finds it.

Logout API Call and Response:

Screenshot 2024-08-29 at 7 42 07 PM

**Network Call Params : **

Screenshot 2024-08-29 at 7 35 57 PM

Expected Behavior

User should get logged out when Logout API call is executed manually.

Steps to reproduce

Details are here in this Discord thread : https://discord.com/channels/1096896040159957084/1278089500307751025/1278089500307751025

Environment

Local + Prod

Additional Information

No response

As the API by itself is working - we need to understand the circumstances. Cause in the way you did try, it is the Data Query - which routes all calls via API-Service. That means, the API-Service sends an API call "to itself". And likely this would not work - even if the API to logout by itself does work as expected.

However, we shall look into it and solve it. This should be done like a feature, as we would need to follow the Cookie and API Calls to understand where we have to add something.

This has been implemented and released.
We can Logout a User using utils.logoutUser().
So, I am closing this ticket out.