07-29-2013 12:36 PM - edited 07-30-2013 09:11 AM
In my Webworks app for OS 5+, I make several XMLHttpRequest calls to my server to login, pull down info, etc. The usual.
Occasionally, and with no apparent pattern (i.e. not always the first time after starting app. Not only specific requests. ) I will get a popup with something along the lines of "This page requires authentication, please enter username and password" and then asks for Domain, username, and password.
However, I can just back out and try again and it will work fine.
Anyone have any experience with this and know of what is possibly causing it or a fix?
Or just any guesses? I'm stumped at the moment.
This does seem to only happen on actual devices though. I haven't seen it in Ripple (not expected) or the emulator. Unfortunately, my Curve does not seem to let me debug it so I have no info other than the dialog that pops up.
Solved! Go to Solution.
07-30-2013 09:41 AM
It's actually "requires authentication" not "requires authorization". I've changed the OP to the correct term.
More research makes me think it is from a 401 when my session expires. At least I can force it by deleting the session.
So then how can I have Webworks leave the handling of the 401 to me as I'd prefer to use my own login page and messages? Particularly since the default seems to want to use basic http auth, which we aren't using.
07-30-2013 11:22 AM
OK, turns out it was a 401. Doh. And the solution for it is here: http://supportforums.blackberry.com/t5/Web-and-Web