A bit of background...
- I joined Esri in mid 2012 (From the Geoloqi acquisition)
- There was no developer site for ArcGIS
- ArcGIS for Developers launched at Dev Summit 2013
Since Then...
- Most docs are moving/moved to developers.arcgis.com
- New tools for developers
- Lots of new capabilites
- Lots of new use cases
Lets Build An App
- Application
- Users
- OAuth 2
Lets face it Oauth 2 is…
- Scary
- Awesome
- The future
- All of the above
Before OAuth 2…
Now…
OAuth 2 is great becuse…
- Users don't have to give away their passwords
- You dont have to store users passwords
- Standardized central & authorative login system
- A well accepted standard around the web
Questions and Decisions
- Do my users have ArcGIS Online accounts?
- Do I want my users to login w/ their ArcGIS Online accounts?
- What is my users don't have ArcGIS Online accounts?
A Tale Of Two Use Cases
"App Logins" vs "User Logins"
"User Logins"
Users allow your applcation to access their ArcGIS Online content an use services on their behalf.
- Users will login with their ArcGIS Online accounts
- Your app will get an
access_token
- Use
access_token
to access that users content
- Use the
access_token
to access services like directions, geocoding, GeoEnrichment, ect...
"User Logins" great for
- Building apps for the ArcGIS Marketplace
- Extending ArcGIS Online
- Letting ArcGIS Online users access premium services
"App Logins"
Your application uses services on behalf of users.
- Your app gets an
access_token
from ArcGIS Online
- Use the
access_token
to access premium services like directions, geocoding, GeoEnrichment, ect…
- You will be able to read from services owned by the same account as the application
"App Logins" great For
- Allowing users to use ArcGIS Online services without authentication
- Letting your own authenticated users access ArcGIS services
- Server and script based applications
Demo Apps
- Vanilla JS user login
- JS API user login
- App login on the server
- App login with a proxy
JS API user login
Integrate OAuth 2 authentication into the JS API.
Source on GitHub
App login on the server
Have our server make authenticated calls to ArcGIS Online.
Source on GitHub
App login with a proxy
Use a proxy with the JS API so make authenticated calls without logging in.
Source on GitHub