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 am using a REST V1 Session Key to authenticate to the API.

    About the user making these API calls, we have a production and staging environment.

    • In production we have the user APIUser, which has an admin role that has allow grant for all permissions.
    • In staging we have the user api_only, which also has an admin role with allow grant for all permission.

    In production, we receive confirmation that the user we are trying to sign out has been signed off all sessions, but when I go and check the community, the web session is kept alive.

    In staging, we also receive confirmation that the user has been signed off all sessions and the web session is also killed.

    I'm not sure why the behavior is like this, but it is consistent.

  • DougS's avatar
    DougS
    Khoros Oracle
    4 years ago

    Hi marvide 

    This seems like a bug with the signoff logic that runs when you make the call (it also seems like a bug that it doesn't sign off web sessions when you use OAuth).

    Would you mind opening a support case for this? That will get a bug opened in our system which we can track and get resolved for you. Please reference this thread in the case when you open one.

    Thanks,

    -Doug