I am trying to create a javascript application using the ArcGIS JS API. I want to use a webmap created on the ArcGIS online. So, I have set the ArcGIS Online WebApp and register it in order to have the appID.
I downloaded the identity-oauth-basic.html from AGOL Link
I altered the appID to match the one of my WebApp and I get Invalid redirect_uri Error as shown bellow.
I checked the details and the redirect_uri is linking back to my html file... How can I set/use the correct redirect_uri on the ArcGIS JS application?
I tried to set the redirect_uri on the OAuthInfo directly without luck
var info = new OAuthInfo({
// Swap this ID out with registered application ID
appId: "<appID in here>",
redirect_uri: "<redirect_uri in here>",
// Uncomment the next line and update if using your own portal
// portalUrl: “https://<host>:<port>/arcgis”
// 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: false
});