IOauth2Options

Interface

Options for static OAuth 2.0 helper methods on UserSession.

Properties

Property Type Notes
clientId string

Client ID of your application. Can be obtained by registering an application on ArcGIS for Developers, ArcGIS Online or on your instance of ArcGIS Enterprise.

duration Optional number

Duration (in minutes) that a token will be valid. Defaults to 20160 (two weeks).

locale Optional string

The locale assumed to render the login page.

portal Optional string

The ArcGIS Online or ArcGIS Enterprise portal you want to use for authentication. Defaults to https://www.arcgis.com/sharing/rest for the ArcGIS Online portal.

provider Optional AuthenticationProvider

ArcGIS Authentication is used by default. Specifying an alternative will take users directly to the corresponding provider's OAuth page.

redirectUri string

A valid URL to redirect to after a user authorizes your application. Can be set on ArcGIS for Developers, ArcGIS Online or on your instance of ArcGIS Enterprise.

refreshTokenTTL Optional number

Duration (in minutes) that a refresh token will be valid.

state Optional string

Applications can specify an opaque value for this parameter to correlate the authorization request sent with the received response. By default, clientId is used.


Interface defined in packages/arcgis-rest-auth/src/UserSession.ts:70