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.beginOAuth2
when thepopup
option istrue
ArcGISIdentityManager.completeOAuth2
when thepopup
option 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(): ArcGISAccessDeniedError
Create a new ArcGISAccessDeniedError
object.
Returns
ArcGISAccessDeniedError
Properties
Property | Type | Notes |
---|---|---|
string | Formatted error message. See the | |
string | The name of this error. Will always be |
message
Class Propertymessage: string
Formatted error message. See the Error
class for more details.
name
Class Propertyname: string
The name of this error. Will always be "ArcGISAccessDeniedError"
to conform with the Error
class.