I am trying to use Services 7.x-3.11, the latest stable available to authenticate and access Drupal 7.34. Accessing from mobile devices with Native coding. I want to keep the user authenticated forever. Is it possible?
Here is the workflow i am following.
First launch of app
- POST
/services/session/token
to retrieve CSRF Token - POST
myendpoint/system/connect
with X-CSRF-Token header - IF not Logged In Try Log in
/myendpoint/user/login
- Log in Success and keep
session_name=sessionid
in Cookie Varible
Future Launches
- POST
/services/session/token
to retrieve CSRF Token - POST
myendpoint/system/connect
with X-CSRF-Token header along with previousely savedsession_name=sessionid
as Cookie Header
From this point I am getting ["CSRF validation failed"] message. Am I missing something? Is the workflow correct?