auth: Facebook now returns auth tokens in json instead of url-encoded
Fixes #1992
This commit is contained in:
parent
c0f99bac0a
commit
8bb8795216
|
@ -978,9 +978,9 @@ class FacebookGraphMixin(OAuth2Mixin):
|
|||
future.set_exception(AuthError('Facebook auth error: %s' % str(response)))
|
||||
return
|
||||
|
||||
args = urlparse.parse_qs(escape.native_str(response.body))
|
||||
args = escape.json_decode(response.body)
|
||||
session = {
|
||||
"access_token": args["access_token"][-1],
|
||||
"access_token": args.get("access_token"),
|
||||
"expires": args.get("expires")
|
||||
}
|
||||
|
||||
|
|
|
@ -149,7 +149,7 @@ class FacebookClientLoginHandler(RequestHandler, FacebookGraphMixin):
|
|||
|
||||
class FacebookServerAccessTokenHandler(RequestHandler):
|
||||
def get(self):
|
||||
self.write('access_token=asdf')
|
||||
self.write(dict(access_token="asdf"))
|
||||
|
||||
|
||||
class FacebookServerMeHandler(RequestHandler):
|
||||
|
|
Loading…
Reference in New Issue