Hi, I'm trying to provide a simple authentication mechanism to my app through arcgis server. Basically what I'm after is this:
So far I've been able to get the login dialog to display as expected, but once I click the sign in button, the message appears:
esri.config.defaults.io.proxyUrl is not set. If making a request to a CORS enabled server, please push the domain into esri.config.defaults.io.corsEnabledServers.
I have added the domain name 'gis.myserver.org' to the list of corsEnabledServers. The network request to authenticate is never sent. CORS is enabled on both the ArcGIS server, and the file server. I can see the headers in the network requests.
Here's my sample code where I am stuck at:
/**
* authenticates the identity manager by checking the current
* sign in status and if necessary displaying the sign in dialog
*/
authenticate: function() {
//this.url is 'https://myserver.org/arcgis/rest/services'
esriId.checkSignInStatus(this.url).then(
//success
lang.hitch(this, 'onAuthenticate'),
//fail, display the sign in dialog
lang.hitch(this, function() {
esriId.signIn(this.url, esriId.findServerInfo(this.url)).then(
//success authenticate
lang.hitch(this, 'onAuthenticate'),
//fail, error out
lang.hitch(this, 'onFail')
);
})
);
},
The error is thrown on the line of getProxyUrl in the urlUtils file. Since I added the url to the esriConfig though, I don't think the proxy should even be used. Do I need to configure a proxy regardless?