Select to view content in your preferred language

How to securely access ArcGIS data via API Key and JavaScript SDK

294
0
11-15-2023 05:43 PM
gatkins
New Contributor

I am creating a web app (Single Page App) that accesses ArcGIS Platform data via an API Key using the JavaScript SDK. The app will have its own Auth mechanism.

My concern is how to do this securely. Just hardcoding the API Key in the client (as per demos) is insecure, as it is easily accessible.

I do see that in the past that proxy servers were suggested, but the official solutions for this are now depreciated.

I could just store the API key in server code server side and write all my own server side code to CRUD data, but that is a whole lot of work and defeats the point of using the JS SDK.

I should add that I will probably need to write my own server side code for when a user needs to insert, update or delete data (in order to implement business logic), but I would like to at least read data via a WebMap by using the JS SDK.

0 Replies