Securely integrate an ArcGIS Web Map into a custom web application

358
3
08-03-2023 12:06 PM
JakeNeedle
New Contributor III

When using the ArcGIS Maps SDK for JavaScript to integrate a WebMap into a web application that I developed, can/how do I secure the whole application including ESRI resources with ArcGIS Online accounts?

3 Replies
David_McRitchie
Esri Contributor

Hey Jake, I would recommend that you check the following documentation for this. It will depend what method of security you wish to integrate. 

Hope that helps,

David

 

Esri UK -Technical Support Analyst
Alex_matias
New Contributor II

Hi , and how use this Oauth 2.0? i already see the video tutorial and the example Access ArcGIS Online items using OAuth 2.0 | Sample Code | ArcGIS Maps SDK for JavaScript 4.27 | Arc... , but nothing works. What  is the portalUrl? and why when i use the example of the site works fine but when i try in code pen doesn't work. I need the use another way to compile?( I knew in the JS arcgis)

0 Kudos
David_McRitchie
Esri Contributor

Hey Alex,

I would avoid using Codepen when using Oauth2.0 as it does not handle token refreshes well. In my own testing, I use Visual Studio Code with the Live Server extension and then open apps up locally.

 

Portalurl will be the URL to your ArcGIS portal. The default arcgis one is www.arcgis.com. You shouldn't need to specify this unless you are using ArcGIS Enterprise in which case you will need to insert the fully qualified domain name in the following format "https://<host>:<port>/arcgis"

David

 

 

Esri UK -Technical Support Analyst
0 Kudos