jgorset/fandjango

Deauthorize callback fails.

mbaechtold opened this issue · 6 comments

I'm having a hard time to get "deauthorization callback" to work.
The view fandjango.views.deauthorize_application is being called from Facebook, but it throws an error:

AttributeError: 'NoneType' object has no attribute 'has_expired'

Stacktrace (most recent call last):

  File "django/core/handlers/base.py", line 168, in get_response
    receivers = signals.got_request_exception.send(sender=self.__class__, request=request)

  File "fandjango/middleware.py", line 75, in process_request
    if request.facebook.signed_request.oauth_token.has_expired:

URL:    http://example.com/fandjango/deauthorize_application.html
Method: GET
Query:  

Hm. I don't see how this could happen in 4.0.4 — which version are you on?

I'm still running with 4.0.2.

You're probably using fandjango with facepy 0.6.2 or 0.6.3, which have a bug that causes the kind of signed request sent to deauthorization callbacks to qualify as having authorized the application.

Please try upgrading to 0.6.4 or 0.6.5 and see if this remedies the issue:

$ pip install facepy --upgrade

I'll upgrade to facepy==0.6.5 and fandjango==4.0.4 today and test it again.
If all goes well, I'll close this issue.

Thx for your advice.

Now it's working like a charm :-)

Great! I'll update the dependencies accordingly.