Esri / application-boilerplate-3x-js

Starter application that simplifies the process of building templates for the ArcGIS.com template gallery.
https://developers.arcgis.com/javascript/
Apache License 2.0
90 stars 68 forks source link

Get oauthappid from `values` #7

Closed robert-claypool closed 10 years ago

robert-claypool commented 10 years ago

If oauthappid is specified in the app's configuration panel (see configurationPanel.js), then it will be accessible through the values property.

Note that oauthappid is currently not part of configurationPanel.js. It would need to be added there if someone wants to have it show up as a panel config.

kellyhutchins commented 10 years ago

Templates are really just web applications and applications built using the templates are just items in arcgis.com that contain the original application url and some configuration information like the web map id that are applied to the application. So the oauth appid only applies to the original application not the created items so we shouldn't include the oauthappid as a configuration option.

The oauthappid is in the boilerplate so that developers who download the template and host it locally can register the application with arcgis.com and set the client id in the app.

Let me know if I'm not correctly understanding what this pull request is for.

robert-claypool commented 10 years ago

The comment above says, In this siutation [sic] the oauthappid is specified in the configuration panel.

I was also doubting that there's a good reason to make oauthappid as a panel config. Maybe all these lines should be removed?

//setup OAuth if oauth appid exists. In this siutation the oauthappid is specified in the
//configuration panel.
if (response.itemData.values && response.itemData.values.oauthappid) {
    this._setupOAuth(response.itemData.values.oauthappid, this.config.sharinghost);
}

Otherwise, I'm not sure what they are supposed to do...