dhellmann / rst2blogger

Convert reStructuredText to HTML suitable for posting to Blogger
Other
13 stars 4 forks source link

failure to authorize by AuthSub #7

Open zooko opened 11 years ago

zooko commented 11 years ago

I did the AuthSub process just now and got this error:

HACK zompu:~/playground/zooko.com$ rst2blogger --blog "thoughts upon news of the death of Aaron Swartz" aaronsw-1.rst

Title: 'None'

Please choose the authorization mechanism you want to use.

  1. to use your email address and password (ClientLogin)
  2. to use a web browser to visit an auth web page (AuthSub)
  3. if you have registed to use OAuth : 2 If you want to use secure mode AuthSub, please provide the location of your RSA private key which corresponds to the certificate you have uploaded for your domain. If you do not have an RSA key, simply press enter: Visit the following URL in your browser to authorize this app: https://www.google.com/accounts/AuthSubRequest?scope=http%3A%2F%2Fwww.blogger.com%2Ffeeds%2F&session=1&secure=0&hd=default&next=http%3A%2F%2Fgauthmachine.appspot.com%2Fauthsub%3Fauth_sub_scopes%3Dhttp%253A%252F%252Fwww.blogger.com%252Ffeeds%252F After agreeing to authorize the app, copy the token value from the URL. Example: "www.google.com/?token=ab12" token value is ab12 Please enter the token value: 1%2FGn8pMx_pJceKX3jVm3LrG_qrLYa4jWnYJrv1aO14vf4 Traceback (most recent call last): File "/usr/local/bin/rst2blogger", line 9, in load_entry_point('rst2blogger==1.0.1', 'console_scripts', 'rst2blogger')() File "/usr/local/lib/python2.7/dist-packages/rst2blogger-1.0.1-py2.7.egg/rst2blogger/cli.py", line 56, in main scopes=['http://www.blogger.com/feeds/']) File "/usr/local/lib/python2.7/dist-packages/gdata-2.0.17-py2.7.egg/gdata/sample_util.py", line 262, in authorize_client consumer_secret=consumer_secret) File "/usr/local/lib/python2.7/dist-packages/gdata-2.0.17-py2.7.egg/gdata/sample_util.py", line 185, in authorize_client client.upgrade_token() File "/usr/local/lib/python2.7/dist-packages/gdata-2.0.17-py2.7.egg/gdata/client.py", line 489, in upgrade_token response.status, response.read())) gdata.client.UnableToUpgradeToken: Server responded to token upgrade request with 403: Invalid token: Cannot parse AuthSub token: 1%2FGn8pMx_pJceKX3jVm3LrG_qrLYa4jWnYJrv1aO14vf4

Invalid token: Cannot parse AuthSub token: 1%2FGn8pMx_pJceKX3jVm3LrG_qrLYa4jWnYJrv1aO14vf4

Error 403

This is with rst2blogger that I got with a git clone just now. It has pkg_resources version metadata saying "1.0.1". gdata is 2.0.17.

dhellmann commented 11 years ago

All of that authorization code is part of the gdata library, and I don't really have any control over it. I'm using their sample utilities, and it sounds like maybe those are broken.

Can you authenticate using email address and password (option 1)?

zooko commented 11 years ago

Can we report this bug to gdata maintainers somehow?

Regarding address and password, see https://github.com/dhellmann/rst2blogger/issues/8