This sample demonstrates the use of OAuth 2.0 authorization for an ArcGIS Online user login. In this sample the user is prompted to enter their credentials which are then authenticated against the requested resource.
Once the user has been authenticated successfully, the AuthenticationManager stores this information until the user explicitly signs out. You will need an ArcGIS Online login to run this sample (AuthenticationManager will prompt for username and password).
Xamarin platforms require the Xamarin.Auth package available at nuget.org.
- When you run the sample, the app will load a web map that contains premium content.
- You will be challenged for an ArcGIS Online login to view that layer (world traffic).
- Enter your ArcGIS Online user name and password.
- If you authenticate successfully, the traffic layer will display, otherwise the map will contain only the public layers.
- You can alter the code to supply OAuth configuration settings specific to your app.