When you work with secure user content you must implement named user login in your app. This allows individual users to authorize your app to use their content and the services they have access to. It also uses their credits for premium content and services.
Registering your application
When you register your application with ArcGIS Online you are given credentials that allow you to initiate named user login or app login. Follow these steps to register your app and generate your credentials:
- If you do not already have an account, sign up for either an ArcGIS Developer subscription or an ArcGIS Online Organizational Trial.
- Sign in to ArcGIS for Developers.
- Go to the applications list.
- Select "New Application".
- Once you have registered your application you will see the application overview. Locate your
client_secret, shown below.
Choosing the best workflow
Where to continue from here depends on the platform and programming language you choose. Follow these links to access the documentation and sample code. Choose the pattern that best matches the capabilities of your application.
When you are logging in users using Esri Leaflet, or REST, or another implementation method, there are several patterns provided by the OAuth 2.0 standard, called grant types, that allow you to securely authenticate users.
Mobile or native
If your application exists entirely on a mobile device or desktop with no server-side component, use the native app workflow.Get Started
If your application is entirely based in a web browser with no server components, use the browser-based workflow to log in users.Get Started
If you are using a server-side component with a browser or native app, the server-side workflow provides the best level of flexibility.Get Started