GeoJSON Layer - ArcGIS JS API - External URL with oAuth2.0

284
2
07-22-2019 10:59 PM
GeorgeAbraham1
New Contributor II

I am using ArcGIS JS API and connecting to an external GeoJSON service for my GeoJSON Layer. However, for security reasons oAuth2.0 has been enabled on the service. 

So now I am lost as to how to connect to this service.

esri/identity/OAuthInfo has URL option only for ArcGIS Portal URL.

I believe it should be a combination of esri/identity/IdentityManager and esri/identity/Credential but it would be great if there is some step-by-step guidance.

0 Kudos
2 Replies
Noah-Sager
Esri Regular Contributor

I would recommend trying the Esri Resource Proxy for this use case:

https://developers.arcgis.com/javascript/latest/guide/proxies/

GeorgeAbraham1
New Contributor II

Hi Noah,


Thanks for the insights - I read through and see there is an mention of client_id and client_secret etc via the proxy though not sure if I got the entire steps how it is to be done. Since setting up the proxy server - one option is via JSP/Java, I will also get in touch with a Java guy to see if its something that he can do based on the article.

Also, it would be great if you can any code sample/prototype that could explain a little more in detail - much appreciated.

0 Kudos