ios - Asana server returning error code 500 on OAuth 2 request with GTMOAuth 2 -


i'm using gtmoauth-2 library implement oauth 2 authorization code grant flow asana api, consistently getting server error 500. gtmhttpfetcher log follows (selectively redacted):

fetch tokens app.asana.com  2013-05-08 16:46:58 +0000 request: post https://app.asana.com/-/oauth_authorize request headers: content-type: application/x-www-form-urlencoded user-agent: gtm-oauth2 <user-agent>  request body: (199 bytes) client_id=<client-id>&client_secret=_snip_&code=<client-secret>&grant_type=authorization_code&redirect_uri=http%3a%2f%2fwww.google.com%2foauthcallback  response: status 500 response headers: cache-control: no-store content-length: 303 content-type: text/html; charset=utf-8 date: wed, 08 may 2013 16:46:56 gmt pragma: no-cache server: nginx set-cookie: <cookie> x-asana-content-string-length: 303 x-asana-preferred-release-revision: 20130508_073846_310cafc985fd5fb43121784b58d5dcd2503ffffe  response body: (303 bytes) <html> <head> <title>error</title><script>__file__="(none)";var config = { "cluster": "prod", "pretty_js_codegen": false, "enabled_features": "" };</script><link rel="shortcut icon" href="/-/static/luna/browser/images/favicon.ico" />  </head> <body> <h3>error</h3><pre>server error</pre> </body> </html> 

i've double-checked auth , token urls, client id , secret, made sure redirect uris match on asana , in-app. interestingly, authorization flow seems far authorizing app (and asana site records app authorized), never seems return authorization token. there anywhere might going wrong, or internal server error?

(i work @ asana). i'm unsure in flow request being made, doesn't correct. once you've obtained authorization code (by having user interact asana form), library should make request our /-/oauth_token endpoint, , pass code. it's possible need using /-/oauth_token endpoint instead of /-/oauth_authorize endpoint you're doing.

if @ our oauth examples you'll note there 2 different urls, 1 authorization , 1 token exchange.

asana returning 500 because it's not expecting , we're not doing enough job catching problem.


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -