I have a private Web Map, that I am trying to access through JavaScript, I created an application to get the OAuth id's and tokens. When the Map loads in, it can get to the base map, but it cannot get the private feature layers that are part of the Web Map.
Solved! Go to Solution.
Hi @TristanG,
Application authentication is intended to access location services and not private content. You also never want to add your client secret to client side code. Doing so will would allow users who might inspect your application with developer tools to steal your client secret. Only the app id should be used client side. More details on application authentication and the limitations are located here.
https://developers.arcgis.com/javascript/latest/secure-resources/#app-credential-authentication
If you want to avoid having your users sign in an still share private content I'd suggest setting up and using network credentials.
https://developers.arcgis.com/javascript/latest/secure-resources/#network-credentials
Hope this helps 🙂
Hi @TristanG,
Application authentication is intended to access location services and not private content. You also never want to add your client secret to client side code. Doing so will would allow users who might inspect your application with developer tools to steal your client secret. Only the app id should be used client side. More details on application authentication and the limitations are located here.
https://developers.arcgis.com/javascript/latest/secure-resources/#app-credential-authentication
If you want to avoid having your users sign in an still share private content I'd suggest setting up and using network credentials.
https://developers.arcgis.com/javascript/latest/secure-resources/#network-credentials
Hope this helps 🙂