Hello, I was developing a simple page app which loads a web map from our portal. The web map is secured. Please see codes below. The portal log in page popped out, but logging was failed even I made sure the account exists in portal and the username and password are correct. I was trying this from my desktop. What did I miss here? How to get access ti a secured portal web map using JavaScript API? Thanks for your help!

