Quote:
Originally Posted by kovidgoyal
You dont pass the username/password via ajax. What you do is direct the browser to the server home page. The browser will then ask the user for the username/password. Once the user provides it, the browser automatically uses it for future ajax calls to the same domain.
|
Yes, but this is not the use case I want to achieve.
I want a mobile cross plattform calibre client written with cordova/phonegap. This means that the app is delivered as native app. Under the hood it works like a local web app -> html / js / css etc. is therefore within the native mobile app. This app should communicate with calibre server (only via ajax calls to get data from the server) And thats the problem...
When I try it e.g. with google chrome and certain development flags (--disable-web-security -–allow-file-access-from-files) auth. works fine... (jquery ajax call handles apparently the authentification procedure) -> but with the android app it doesn't work...