Thanks Rene.What is the best way to pass the credentials in code for a custom application and it can't use proxy because it is a react, angular or vue?
If you get a token from outside your application, you can use the IdentityManager.registerToken method to register the token and what server it is from developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#registerToken
I need to point to the enterprise environment, is the procedure the same? I tried to apply this same code with my app's id, but it returned me -> Invalid client_id error: 400
The workflow is the same, but you need to create the application in your Enterprise portal and you can set the Portal URL in the OAuthInfo developers.arcgis.com/javascript/latest/api-reference/esri-identity-OAuthInfo.html#portalUrl
Thanks Rene. I wasn't able to find any info on refreshing the login information. Currently once the token expires it redirects the user to the OAuth page to re-allow access. Is there a way to manage this workflow by refreshing the authentication information as long as the user is still active and making requests?
Thanks Rene a lot for your video. However I have a question, when you have an external item referenced on your portal, the url looks like : [my-web-site]/portal/sharing/servers/24191ed3d23948e2ac0accf8c877a824/rest/services/SDPCONS/MYLAYER/FeatureServer No need for origin portal credentials (they are stored with the item), I only need authentication to my portal (target). I dont know in this case how to register token for IdentityManager. I ve tried somthing like const properties = { server: portalUrl , token: user.gisToken, } as IdentityManagerRegisterTokenProperties; IdentityManager.registerToken(properties); but didn't work, still have the authentication form. could you help me pleaaaaaase?
Great video! New to javascript and only a little experience with ArcGIS, this helped me understand what was going on so much better.
Man, you know your stuff! Wish I could function like this when writing code for my GIS applications!!!
Thanks Rene.What is the best way to pass the credentials in code for a custom application and it can't use proxy because it is a react, angular or vue?
If you get a token from outside your application, you can use the IdentityManager.registerToken method to register the token and what server it is from developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#registerToken
I need to point to the enterprise environment, is the procedure the same?
I tried to apply this same code with my app's id, but it returned me -> Invalid client_id
error: 400
The workflow is the same, but you need to create the application in your Enterprise portal and you can set the Portal URL in the OAuthInfo developers.arcgis.com/javascript/latest/api-reference/esri-identity-OAuthInfo.html#portalUrl
@@odoenet Thanks Rene
can i apply this method for display private dashboard arcgis online?
That auth workflow is different and built in to dashboards. This video applies for building custom apps.
Thanks Rene. I wasn't able to find any info on refreshing the login information. Currently once the token expires it redirects the user to the OAuth page to re-allow access. Is there a way to manage this workflow by refreshing the authentication information as long as the user is still active and making requests?
Using OAuth, no. By design, they have to re-allow access to get a new token.
Thanks Rene a lot for your video.
However I have a question, when you have an external item referenced on your portal, the url looks like :
[my-web-site]/portal/sharing/servers/24191ed3d23948e2ac0accf8c877a824/rest/services/SDPCONS/MYLAYER/FeatureServer
No need for origin portal credentials (they are stored with the item), I only need authentication to my portal (target). I dont know in this case how to register token for IdentityManager. I ve tried somthing like
const properties = {
server: portalUrl ,
token: user.gisToken,
} as IdentityManagerRegisterTokenProperties;
IdentityManager.registerToken(properties);
but didn't work, still have the authentication form. could you help me pleaaaaaase?