I have a backend with drupal !
Using Drupal Services to interact with. which provides a rest server !
Created endpoint named ‘api’
Following sequence works in normal browser or any http client like postman :-
- example.com/api/login (works)
- api sends back user data (token,session id, session name etc).
- Further any request i make , i send token as X-CSRF-Token (all requests work).
- i can even logout the same session with the token received before !
IN IONIC APP :-
I can login and i am also able to store user data (token, session data etc). in localstorage after login
here’s the difference in app :-
When i send same token back to server while making a request ( say logout)
Server’s Response is “User is not Logged In.”
Why does this happen ?
PLEASE HELP !
Help is appreciated !