Unable to assign clientId to OAuthClientInfo dynamically

1771
0
06-26-2016 09:55 PM
HeathcliffRongo
New Contributor III
  1. Download and open the Sign In OAuth2 sample in QtCreator
  2. Have Fiddler open
  3. Run the app and it should successfully authenticate against ArcGIS Online
  4. In Fiddler note that the authorize call contains a client ID parameter value
  5. In App Settings, specify a client Id
  6. In OAuth2.qml, find the OAuthClientInfo declaration and replace the hard-coded client ID with app.clientID
  7. Run the app again and you'll an Invalid client_id error
  8. Look at Fiddler and note the absence of the client ID parameter value

It seems that no matter what I try, I can't get oAuthClientInfo.clientId to persist when using an expression to return a client ID (e.g. from appinfo.json). It only works when I hard-code the client Id.

Anyone else experience this issue, and know of any workarounds (other than hard-coding the ID).

Cheers.

0 Kudos
0 Replies