Forum Discussion

marvide's avatar
marvide
Adept
4 years ago

Logging a user out not working

Hello,

I'm currently developing a solution to log out a user from the community sessions automatically. I followed the API Reference here: https://developer.khoros.com/khoroscommunitydevdocs/reference/authsignout

I am currently getting the correct response of the user being signed out of all sessions but when I go to the community forums with my test user I can still see the user logged in.

This is the json response that I am receiving:

{
  "status":"success",
  "message":"",
  "data":
  {
    "signed_off_all_sessions":true,
    "id":"#######"
  }
}

Context: we do use a cookie for our users to log into the community site if they are logged into our site. But I have made sure to just be logged into the community site without said cookie when trying this call out. 

 

Any help would be welcomed.

12 Replies

  • marvide's avatar
    marvide
    Adept
    4 years ago

    I was indeed sending both the id and the sso_id at the same time. Right now I tried just sending the sso_id like this:

     

    {
      sso_id: $user_sso_id
    }

     

    And it's still returning the correct response of all sessions being logged out, but I am still clearly not logged out. 😞

     

    Edit: Just tried sending the user id like so

    {
      id : $user_id
    }

    And still, the user is not logged out.

  • Are you using the correct body parameter for your setup? E.g. sso_id if your setup is using SSO or just id when you are using Khoros community authentication. Not sure if mixing them up would actually work, but I've personally already mixed up ids versus SSO ids before 😛