I am developing an application with SAPUI5 as frontend and oData services as backend. The documentation says that application should not have own Login screen but in our application we need to have login screen.
I am using oDataModel initialization command to check for login with username and password, Everything is working fine if user enters valid credentials but when he enters wrong credentials the browser shows prompt asking for credentials and clicking on Cancel button breaks the application. I checked the documentation and could not find any option to mention handler functions for success/failure.
Here is the initialization code I am using'
var oModel = new sap.ui.model.odata.ODataModel(url,true,username,password);
It would be helpful if i can get insights on how to go with Login and handle the login failure scenario.