Forum Discussion
6 Replies
http://community.lithium.com/community-name/restapi/vc/authentication/sessions/logout
This thread could be helpful.
- ashinde8 years agoGuide
TariqHussain Thanks for help.
We have created endpoint and we are calling api "http://community.lithium.com/community-name/restapi/vc/authentication/sessions/logout" using rest.If we hits the endpoint in browser,then user is not getting logout. If we calling this endpoint from third party domain using ajax then also user is not getting logout.
ashinde - As this is a POST call, you can log out by hitting this URL on the browser. If you are calling this endpoint from third party domain, make sure you are making an AJAX POST request with all required params.
- ashinde8 years agoGuide
TariqHussain, Thanks.
We are calling below api from third party using ajax post request, still user is not getting logout.
http://community.lithium.com/community-name/restapi/vc/authentication/sessions/logout
can you please let us know anything is missing.
- ChiaraS8 years agoLithium Alumni (Retired)
The above call will not terminate the existing user session, it's only meant to terminate an API session (basically invalidating the current "restapi.session_key" value).
There's no API call you can use to logout the community session from an external system, you're also not specifying if your community uses Lithium Authentication or it has an SSO integration and in case which type of integration.
What you could do is redirect the user browser to the default logout url:
${webUi.getUserLogoutPageUrl("/")}
Or you can reach out to Support and they can check with Professional Services on the effort to build a custom logout endpoint for your community.
- AdamN8 years agoKhoros Oracle
Recently there was an API v2 method added for "Invalidating sessions" which I believe should include active UI sessions also:
I suggest giving it a try to see if that accomplishes what you're looking for.
Related Content
- 4 years ago
- 5 years ago
- 12 years ago