Cordova Bug (401 authentication over WebSocket)


#1

Open a websocket with basic HTTP authentication. Works fine in Chrome, but fails in emulator.


#2

And it is for reasons like this that I believe Ionic is not suitable for creating professional apps. The entire ecosystem is hacked together with things that either work or don’t work depending on special cases. A simple thing like www-authenticate was not fixed for over a year since reported and the bandwagon continues to hail itself as the next best thing in app development. The only replies I find online ask you to fix the server (disable WWW-Authentication headers) instead of fixing the app. This might be the most stupid bug I’ve seen anywhere in a while.


#3

It is not the problem of the framework.

I develop backend and frontend stuff…
Also rest apis with nodejs and oauth mechanism (token based authorization).

To handle such things i need to develop in chrome and disable web-security.
And if i am on a state, to test on devices i build the apk or ipa -> install it on the device and it works.

I have build some shopping apps with magento and the xml-connect plugin … it is using session/cookie-based authorization -> it works *magic happens.

But you are write if you are talking only about web-sockets. But if you take a deeper look android supports sockets since android version 4.4. So in this case it is a fault of the device not ionic.

And for other cases you can try the the plugin “phonegap-websocket” (also available for cordova) and build your server with e.g. socket.io .

Maybe you can better describe your use case… instead of blaming around

Greetz.