Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

New Developer
Posts: 8
Registered: ‎08-04-2014
My Device: BlackBerry Q10/Z10
My Carrier: Telus

Suppressing "Authentication Required" Dialogs in BB10

Hi All,


I'm moving a Phonegap app from iOS/Android to BB10, and the only roadblock I haven't been able to solve in WebWorks is suppressing the "Authentication Required" dialogs when a user enters an incorrect username and password.


I'm using jQuery's AJAX method to make the GET request with Basic Authorization and 64-bit encryption. Everything works great if the username and password are correct, but if they are not, the dialog will appear repeatedly regardless of whether the username and password are correctly re-entered. The preferred scenario is that the AJAX call will return control to the app to deal with the incorrect credentials. 


I understand that in previous SDKs, the file authenticator.java could be modified such that the call to invokeAndWait in the invokeAuthenticationDialogAndStoreCredentials function could be commented out to solve this problem. I cannot locate an equivalent solution in BB10's WebWorks (2). Has anyone else encountered this roadblock?


Any insight into this is greatly appreciated. Cheers!