I am using Drupal 7 and Services module
To create endpoints for login and subsequent functionality exposed for logged in users
As noted here and here, the ideal workflow should be -- Make a POST request with username and password > to end point /user/login (the end point is already enabled) > return data contains Session name and Session id > you join both of them with an '=' in between to form the cookie > you send that cookie in subsequent requests in the request header > these requests automatically get treated as authenticated user requests > All is good
But in my case when I do the last step (send cookie in request header) something weird happens. The
uidassociated with that particular session in the
sessionstable is set to 0. (In effect the session is authenticated user session anymore, it is not destroyed either, it just goes anonymous)
I am really puzzled by this. I have replicated the behavior on multiple setups, and hoping that this is just a case of me missing something obvious here.
Any help would be much appreciated? Super many thanks in advance.