An application demonstrating how to retry a request that requires authentication.
You can generate your own clientid by creating an application on the
ArcGIS for Developers
website and adding
as a redirect uri.