Last modified: 2013-10-10 18:50:22 UTC
Flask-OAuth [1] expects a response like { "oauth_token":"...", "oauth_token_secret":"..." } which, is apparently fairly standard, as it's used by both Twitter and Facebook. Special:MWOAuth/initiate, however, returns { "key":"...", "secret":"..." } As a workaround, I have patched Flask-OAuth: import flask_oauth, json def parse_response(resp, content, strict=False): ct = json.loads(content) print ct return {'oauth_token': ct['key'], 'oauth_token_secret': ct['secret']} flask_oauth.parse_response = parse_response [1] http://pythonhosted.org/Flask-OAuth/
What exactly are you using as an endpoint URL? When I test it here, I can only reproduce this if the (non-standard) format=json is included. Omitting that parameter appears to properly return a application/x-www-form-urlencoded body with the field names, as called for in RFC 5849 section 2.1.
Ah, I had based myself on https://www.mediawiki.org/wiki/User:CSteipp/OAuth_demo_client . Leaving off the &format=json seems to work correctly. Thanks!