Good Day
I'm trying to bypass the sign-in process to access our host feature layer from the ArcGIS JavaScript API, I tried implementing OAuth, following the guides, and used this:
const info = new OAuthInfo({
appId: "<blah>",
popup: false
});
identityManager.registerOAuthInfos([info]);
But every time the feature layer load it kicks me over to a sign-in page, and once I sign-in it kicks me back to our application, but to the wrong page and I enter a non-stop loop,. It is possible to use an ApplicationSession and use the Client ID / Client Secret to generate a token, which I can then register to bypass this issue?
We have this function for queries:
authenticate() {
this._session = new ApplicationSession({
clientId: '<blah>',
clientSecret: '<blah>'
})
}
But I don't see any option to attach the authentication parameters to the FeatureLayer URL
I looked up this page: https://enterprise.arcgis.com/en/server/latest/administer/windows/about-arcgis-tokens.htm which doesn't explain how to attach or generate the token, unless I'm meant to use the token from the ArcGIS Developer Portal.
Thanks