Hi, I have been following the sample
Access ArcGIS Online items using OAuthentication - 4.15
and i kept getting a invalid redirect_uri.
I have done the following
my code
can someone please advise what have i done wrong?
var info = new OAuthInfo({
// Swap this ID out with registered application ID
appId: "c13v2Nuys97mUArm",
// Uncomment the next line and update if using your own portal
//portalUrl: "",
// Uncomment the next line to prevent the user's signed in state from being shared with other apps on the same domain with the same authNamespace value.
authNamespace: "portal_oauth_inline",
popup: true
});
IdentityManager.registerOAuthInfos([info]);
IdentityManager.getCredential(info.portalUrl + "/sharing")
.then(function(){
const map = new Map({
basemap: "hybrid",
layers: [layers]
});
const view = new MapView({
container: "viewDiv",
map: map,
center: [116, -32],
zoom: 10,
popup: {
autoOpenEnabled: true
}
});
//do whatever else
Solved! Go to Solution.
Hi Victor Tey
Hi Victor Tey
Spot on. Thank you Derrick Wong