I am using secured map service for one of my applications. When I open the application, the authentication window opens asking for password and user id. Is there any way I can specify the user id and password in the code for application, so it uses it automatically when the application opens?
Are you using an application built with Web AppBuilder? If you are, you can add the secure service to ArcGIS Online as an item. You will be prompted for the username/password and have the option to store the username/password with the item. See the following help document:
You could also setup a proxy:
Here is an example of a proxy.config file with a username/password for a secure service:
username="user1" password="gis12345" matchAll="true">
thank you for your reply!
Yes, I am using WAB Developer Edition. I set up the proxy by adding proxy folder to my application and including server url information to proxy.config file.
Since I am doing it for the first time, I am bit confused on what I should write in the applications' config.json file.. Path to the proxy?
Now it is like that: