I ran into the same issue as the original topic poster. Considering
we're a few months further but some OAuth2 providers are still sending
responses in http form I wrote a patch for gtm-oauth2 that looks at
the response header and either decodes the JSON or the http form
fields.
The patch can be found here:
http://code.google.com/p/gtm-oauth2/issues/detail?id=1
Greetings,
Ivo