Skip to content

Latest commit

 

History

History

jsapi-oauth

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Accessing ArcGIS Online using OAuth 2.0 with ESM + Vite

This sample demonstrates how to log in to ArcGIS Online or Enterprise using OAuth 2.0 authentication and the IdentityManager with @arcgis/core ES modules with Vite .

Get Started

  1. Create a registered application in ArcGIS Online or ArcGIS Enterprise and add a valid redirect URL that will redirect you back to your hosted application after login. See the Register an OAuth application tutorial for more details.
  2. Copy the Client ID from your registered application in step 1 and use it to replace the appId property on line 27 in the main.js file.
  3. Run npm install then npm build dev to test the app.

For a list of all available npm commands see scripts in package.json.

For additional information, see:

Learn More

You can learn more in the Vite guides.