The user is experiencing issues with the User Log out API, which returns a success response but fails to terminate the user session in the browser. Additionally, they are unable to set a user’s group using the add_groups parameter in the return payload.
kalpantkrishna_patil has provided code snippets for the API call and SSO implementation. vinothkannans suggested enabling verbose_sso_logging for debugging and checking if the user is logged out in the application before calling the API.
riking pointed out the lack of error handling in the provided code, but kalpantkrishna_patil assured that there is centralized error handling in place and that the API call is successful, with a response of {"success":"OK"}.
Hi,
I’m using SSO settings and calling User Log out API (https://discourse.example.com/admin/users/{id}/log_out) from my application. Now API returns Success in response but user session still alive in browser. what should be the cause?
-Another issue is that Group is not getting set to User while passing from returnPayload.
Yes, I’m calling “log out API” after user logout from our application. I observed logs on (xxxxx.trydiscourse.com/logs) but seeing only warning there and no Errors/Fatal.
Note: I’m using discourse trial instance for now and user Group passing(in return payload) functionality is also not working.
Yes @riking, It has centralised error handling code. I have debugged this code and got Response - {“success”:“OK”}. Also hit this API from postman and got the same response - {“success”:“OK”}