I have a web application that has map features. The application uses .Net for business logic and JavaScript for mapping. We are considering adding an AGOL feature layer on the map. However we don't want to make the feature layer public, meaning anyone who has the url can open and access the data.
What is the best way to make the layer accessible only to the web application and the data owner? I know we can probably do something like creating a named user, grab the token and append it to the url in code. Does that work or is there a better way? Are there examples online?
Thanks.