So we have a webmap that is INTERNAL ONLY. We have to build the 'ArcGIS' map side online, then using WAB build the web map, prop it up on our internal server, and now it's asking for AGOL sign on. This is supposed to be used by Field Crews?! They will 'never' have AGOL accounts... what is the proper workflow for a situation like this?
Solved! Go to Solution.
Hello,
I used the fantastically helpful info in this thread to make a locally-served WAB app that calls an AGOL Web Map (private, shared with organization only) available to internal users WITHOUT the AGOL login. This is great! Thanks to all involved (especially Robert [as usual]).
One odd thing. After editing the config.json in my WAB Dev/server/apps/# directory to include the proxy-related info, and then exporting ("download") the app, the edits in that file are not saved. I have to re-edit the downloaded config.json to add the proxy info. Does anyone know why this happens?
Barnaby,
The export routine in the Builder core code replaces the proxy (which normally would be the JSNode proxy.js) as the exported app would not have access to NodeJS and the proxy.js.
Ok, thanks, Robert. I was wondering if I was doing something wrong.
By the way, do you know of a way to encrypt the proxy.config file so that my AGOL password isn't easily readable to other users of my server?
Cheers,
Barnaby
Barnaby,
If that is a concern then I would go the clientId and clientSecret route then.
Robert,
Ok. I don't know about those options. Do you know where I can get more info on them? Are they set up on AGOL for your registered app or Web Map?
Thanks,
Barnaby
Barnaby,
See this resource:
Setting up a Proxy | Support Services Blog
Specifically step 11 where it says:
Note: When using ArcGIS Online services the recommended workflow is to use a client id and client secret. The client id and client secret are obtained from developers.arcgis.com. - See more at: http://blogs.esri.com/esri/supportcenter/2015/04/07/setting-up-a-proxy/
Excellent!
Many thanks, Robert.
Cheers,
Barnaby
Robert,
I can't get the proxy to work with ClientID/Secret using credentials for 1) the internally-shared AGOL Web Map called by my local WAB app, 2) my registered WAB Dev installation (unshared), or 3) the registered, internally-shared WAB app on my local server. If I make a proxy.config with either of those, the internal app can be accessed without entering AGOL credentials for a few minutes, after which AGOL credentials are required again. Adding the "rateLimit" lines mentioned above does not help. But I'm still testing...
My AGOL username/password in the proxy works fine, and is persistent. Perhaps this is the best/only way to go for my situation.
Cheers,
Barnaby
Barnaby,
Not sure what to tell you I am using the client id/secret and I have never had that happen.
Robert,
What AGOL item are the clientID/Secret for in your proxy.config? The WAB app on your local server (I assumed that the client ID credentials are for that item, based on item #3 in your "correct" post above)?
-Barnaby