The process of programmatically verifying users and requesting an access token
In general, user authentication flows are divided into OAuth 2.0 flows and Non-OAuth flows. An OAuth 2.0 flow is recommended for almost all use cases, except for some developers working with ArcGIS Enterprise
| Authentication flow | OAuth 2.0 | OAuth 2.0 grant | Use cases |
|---|---|---|---|
| Authorization code with PKCE | ✔ | authorization | Client-side apps such as native apps, mobile apps, and web applications without a server-side component |
| Authorization code | ✔ | authorization with PKCE | Web apps with a server-side component |
| Implicit | ✔ | implicit | Deprecated. No longer recommended for use. |
| Generate token | ✖ | ✖ | Trusted or local applications when other flows cannot be used |
| Integrated Windows Authentication (IWA) | ✖ | ✖ | ArcGIS Enterprise applications |
| Public key infrastructure (PKI) | ✖ | ✖ | ArcGIS Enterprise applications |
OAuth 2.0 flows
ArcGIS follows the industry-standard OAuth 2.0 protocol for authorization. It supports the following OAuth 2.0 flows for user authentication
Authorization code with PKCE
Authorization code flow with Proof Key for Code Exchange (PKCE) is the primary OAuth 2.0 flow that ArcGIS recommends for user authentication
It uses the OAuth 2.0 authorization grant type and requires a client from a set of OAuth credentialsclient_id, client_secret, and redirect URIs. They are a type of developer credential.
All of the Authentication and Identity classes in ArcGIS APIs
Authorization code
The authorization code flow is an OAuth 2.0 flow used to implement user authenticationauthorization grant type and requires a client from a set of OAuth credentialsclient_id, client_secret, and redirect URIs. They are a type of developer credential.
This flow grants an access token
Implicit (deprecated)
The implicit flow is an OAuth 2.0 flow that was previously used to implement user authentication
This flow grants an access tokenresponse of token. The access token can then be used to authorize requests to secure ArcGIS resources
Non-OAuth 2.0 flows
ArcGIS supports additional user authentication
- Generate token flow
- Integrated Windows Authentication (IWA) flow for ArcGIS Enterprise
- Public Key Infrastructure (PKI) flow for ArcGIS Enterprise.
Generate token
Enterprise flows
These flows are only supported by ArcGIS Enterprise
Integrated Windows Authentication (IWA)
This method manages user login through Microsoft Windows Active Directory and the user typically manually enters their username + password. To use Integrated Window Authentication, you will need to configure it in ArcGIS Enterprise.
Public key infrastructure (PKI)
Public and private digital keys support authentication and secure communication over insecure networks. To use PKI, you need to configure it in ArcGIS Enterprise using either Lightweight Directory Access Protocol (LDAP) or Windows Active Directory.
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