I shared a map a created on my Desktop ArcGIS to ArcGIS Online and used the REST server URL to make a web app similar to this: https://developers.arcgis.com/javascript/3/jssamples/fl_hover.html. Whenever I try to access the web page, I am prompted for my ArcGIS Online username and password, but I keep getting an error message when I try to log in saying my username and password are incorrect. I know my ArcGIS Online username and password are correct. What could be the reason why they are not working here?
Are any of the services coming from you ArcGIS Serever? and are any of the services secure?
Have you made sure it is shared with everyone?
Some places to check:
Share maps—ArcGIS Online Help | ArcGIS
Share maps, scenes, and apps—ArcGIS Online Help | ArcGIS