Class
This error code will be thrown by the following methods when the user cancels or denies an authorization request on the OAuth 2.0 authorization screen.
ArcGISIdentityManager.beginOAuth2when thepopupoption istrueArcGISIdentityManager.completeOAuth2when thepopupoption isfalse
import { ArcGISIdentityManager } from "@esri/arcgis-rest-request";
ArcGISIdentityManager.beginOAuth2({
clientId: "***"
redirectUri: "***",
popup: true
}).then(authenticationManager => {
console.log("OAuth 2.0 Successful");
}).catch(e => {
if(e.name === "ArcGISAccessDeniedError") {
console.log("The user did not authorize your app.")
} else {
console.log("Something else went wrong. Error:", e);
}
})Inheritance: ArcGISAccessDeniedErrorError
Constructors
constructor
Class Constructornew ArcGISAccessDeniedError(): ArcGISAccessDeniedErrorCreate a new ArcGISAccessDeniedError object.
Returns
ArcGISAccessDeniedErrorProperties
| Property | Type | Notes |
|---|---|---|
message | string | Formatted error message. See the |
name | string | The name of this error. Will always be |
message
Class Propertymessage: stringFormatted error message. See the Error class for more details.
name
Class Propertyname: stringThe name of this error. Will always be "ArcGISAccessDeniedError" to conform with the Error class.