User authentication is a set of authentication workflows that allow users with an ArcGIS account
User authentication provides access to secure ArcGIS services and content on behalf of a user. It offers several advantages over other types of authentication:
- Supports the secure OAuth 2.0
authorizationflow._code - Grants access to all services available to a user, including portal services
ArcGIS portal, also known as a portal, is a website with applications and tools that can be used to create, manage, access, and share geospatial content and data. It supports security and authentication, developer credentials, content and data service management, user and group management, and site administration. A portal can be hosted in Esri's infrastructure or your own infrastructure. and spatial analysis servicesA spatial analysis service, also known as a feature analysis service, is a service used to perform spatial analysis operations on feature data such as finding, comparing, summarizing, analyzing patterns, and calculating geometries. . - Bills usage to user's accounts, rather than the developer's account.
How user authentication works
The typical steps to implement user authentication are as follows:
-
Create a set of OAuth credentials
OAuth credentials are an item that contains parameters required to implement user authentication or app authentication, including a in your portalclient_id,client_secret, and redirect URIs. They are a type of developer credential.ArcGIS portal, also known as a portal, is a website with applications and tools that can be used to create, manage, access, and share geospatial content and data. It supports security and authentication, developer credentials, content and data service management, user and group management, and site administration. A portal can be hosted in Esri's infrastructure or your own infrastructure. and set a redirect URL. -
Paste the
clientand redirect URL from your OAuth credentials into your application._id -
Use an ArcGIS Maps SDK
ArcGIS Maps SDKs are developer products for building mapping and spatial analysis applications for web browsers, native devices, and game engines. or APIAn ArcGIS API is a web, native, game engine, or scripting API that has advanced mapping and spatial analysis capabilities and can be used to access ArcGIS services. ArcGIS APIs are designed to work optimally with the ArcGIS system and provide the most advanced GIS features and the highest performance possible. to create an authentication manager class and prompt users to sign in. -
Once authenticated, access the secure resources
A secure resource is any item or service in an ArcGIS that requires an ArcGIS account and authentication to access. Examples include ArcGIS Location Services, and items and data services in an ArcGIS portal. available to the signed-in user in your application.
OAuth credentials
OAuth credentials are an item
User authentication flows
There are six different workflows that can be used to implement user authentication:
- Authorization code flow with PKCE
- Authorization code flow
- Implicit flow
- Manual token generation
- HTTP/Windows/Integrated Windows Authentication
- Public key infrastructure (PKI) authentication
The flow you use will vary based on the type of application you build and client API you select.
Examples
ArcGIS APIs
If you are using one of the ArcGIS Maps SDKs
- ArcGIS Maps SDK for JavaScript
- ArcGIS Maps SDK for Kotlin
- ArcGIS Maps SDK for Swift
- ArcGIS Maps SDK for Java
- ArcGIS Maps SDK for .NET
- ArcGIS Maps SDK for Qt
After you complete the OAuth 2.0 authorization process, you receive a token credential to use when accessing any contentAuthentication and Identity classes automatically use a token credential to securely access resources, requiring no additional actions from you.
Non-ArcGIS APIs
It is possible to implement ArcGIS user authentication with non-ArcGIS APIs, however you remain responsible to obtain, manage, and secure user credentials as a part of your application. For this method, you must implement the appropriate authentication flow for your application. The following OAuth 2.0 flows are recommended:
Product and account requirements
User authentication is available with ArcGIS Location Platform
Tutorials
Create OAuth credentials for user authentication
Sign in with user authentication
Create an application that requires users to sign in with an ArcGIS account
Service support
The following table provides an overview of the functionality available with each type of authentication:
| API key authentication | User authentication | App authentication | |
|---|---|---|---|
| ArcGIS Location Services | 1 | 1 | 1 |
| Data services (Item access) | 2 | ||
| Spatial analysis services | 1 | 1 | |
| Portal service (General privileges) | |||
| Portal service (Admin privileges) |
- 1. Supported with ArcGIS Online and ArcGIS Location Platform.
- 2. Supported, but not recommended due to security risks.
API support
- 1. Supported via ArcGIS REST JS