My application is registered on the proprietary Arcgis account and I have its client/application ID.
As many, I have this "redirect_uri" error displayed when I am launching my application and try to sign in, and even when I am naively double click on the unmodified identity-oauth-basic.html file provided by the aforementioned tutorial. Following that, I got a bit confused with what I can find on the net to solve this problem.
From what I gathered from the net, I understand that I need to specify on the Arcgis portal the URL of the page users of my app are redirected to after they successfully log in.
But in my case, everything is local and I am basically embedding a html file through my application. Thus I don't know what to specify as a "redirect url" in the "Authentication" pane of the registered application on the Arcgis account.
I tried to add "http://localhost/" and "https://localhost/" as some tutorials and forum posts may specify it, but the problem is still here. I wouldn't actually know what I should type in a web browser to point to my html file, except from its absolute path.
I added as well as a "redirect url" the address I am specifying in my OAuthInfo instance. Here as well I am getting confused about the different specified urls. The proprietary portal url I am trying to work with has the following format: https://<company name>.maps.arcgis.com. But some urls are specified with the '/arcgis' (redirects to a non-found page in my case) at the end and the aforementioned tutorial is even adding the '/sharing' extension (redirects to a page where I can be redirected to the Arcgis API reference). What are the conventions here and what should I use in my OAuthInfo instance and on the application authentication settings?
Can someone clarify these different points and help move forward with this authentication problem? Thanks a lot in advance.
You could try adding the machine name that is running the application as the redirect_uri. For instance, if the application is running off of a server named j.test.com, you could specify http://j.test.com and https://j.test.com
Also, it might be helpful to understand the purpose of the redirect_uri: "Redirect URIs are valid addresses that users of your app can be redirected to after they successfull..." Say that you are accessing the application using a certain URL (https://j.test.com/webAppURL). After clicking the sign-in button in your app, the OAuth process should take you to your portal sign-in page. After signing-in, you will be redirected to the initial URL (https://j.test.com/webAppUrl). As long as you have the proper redirect_URI set (in the example, https://j.test.com), you should be redirected properly from the portal sign-in page back to your application URL.
The application is a c++ application running locally on a dedicated computer. It is not running off of a specific server.
I talked about "proprietary" portal but "private" may have been a better adjective. This arcgis portal is managed by another company. I am trying to upload a feature layer I am creating locally through my application on this portal.
The OAuth process should allow me to log in to this arcgis portal so that I can uploade data on it.