0

I have implemented a small website using the well known php-login codebase (https://github.com/panique/huge).

I have now in the process of creating an android application (using Cordova) that will take advantage of the Username/Password to communicate with a REST API.

I thought that it would be very simple to integrate my REST API and the php-login authentication system, however, apparently, the jquery mobile codebase that I am creating in Cordova does not allow me to get the session Cookie from the website.

I am debugging with PostMan and everything runs smoothly there, however, as soon as I switch to Cordova, everything stops working.

Searches on the internet have brought the issues of CORS, Cross side scripting, and other issues that I have tried, and all failed.

Is there a way to make php-login more friendly on that sense and integrate better with REST authentication?

2dvisio
  • 861
  • 2
  • 10
  • 29
  • check here for handling cookies with cordova -- http://stackoverflow.com/questions/15349237/handling-cookies-in-phonegap-cordova -- as for cors you can add ( header('Access-Control-Allow-Origin: *'); ) at the top of your PHP files. you could always POST the session id and store it in a variable or local storage – Tasos Apr 08 '15 at 22:13
  • Thank you @Tasos, since then I realised that actually cordova acts in all effects as a browser and manages the cookies in a seamless way. – 2dvisio Jul 07 '15 at 22:49

0 Answers0