c# - Not getting a result with single sign on to Goodreads on Windows 8.1 -
i trying sign in goodreads. calling webauthenticationbroker, opens overlay log in. works far, can't overlay close after login. not getting success result. when using backarrow "usercanceled" result.
here i've got far:
string goodreadsurl = "https://www.goodreads.com/oauth/authorize?oauth_token=" + properties.oauth_token;  uri sid = webauthenticationbroker.getcurrentapplicationcallbackuri(); string callbackurl = sid.tostring();  var starturi = new uri(goodreadsurl);  webauthenticationresult result = await webauthenticationbroker.authenticateasync(webauthenticationoptions.none, starturi, new uri(callbackurl)); if (result.responsestatus == webauthenticationstatus.success && !result.responsedata.contains("&error=")) {     [...] }   i found similar question cannot facebook single signon windows 8.1 work, suggested answer not working case.
any ideas?
i think might indicate oauth callback url wasn't being navigated , code seems wasn't specified. might need add it. try this:
string goodreadsurl =     "https://www.goodreads.com/oauth/authorize?oauth_token=" + properties.oauth_token;  uri sid = webauthenticationbroker.getcurrentapplicationcallbackuri(); string callbackurl = sid.tostring();  var starturi =     new uri(goodreadsurl + "&oauth_callback=" + uri.escapedatastring(callbackurl));  webauthenticationresult result =     await webauthenticationbroker.authenticateasync(         webauthenticationoptions.none,         starturi,         new uri(callbackurl));  if (result.responsestatus == webauthenticationstatus.success &&     !result.responsedata.contains("&error=")) {     [...] }   check docs mentioning callbacks here: https://www.goodreads.com/api/documentation
Comments
Post a Comment