From 814170dc2371b472e4a973c0376c0c123802cfb7 Mon Sep 17 00:00:00 2001 From: David Avsajanishvili Date: Thu, 11 Apr 2013 00:29:06 +0100 Subject: [PATCH] Change oauth verifier logic --- twython_django_oauth/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/twython_django_oauth/views.py b/twython_django_oauth/views.py index 9788d04..f976e3e 100644 --- a/twython_django_oauth/views.py +++ b/twython_django_oauth/views.py @@ -37,6 +37,7 @@ def begin_auth(request): # Then send them over there, durh. request.session['request_token'] = auth_props + request.session['request_verifier'] = request.GET.get('oauth_verifier', None) return HttpResponseRedirect(auth_props['auth_url']) def thanks(request, redirect_url=settings.LOGIN_REDIRECT_URL): @@ -60,7 +61,7 @@ def thanks(request, redirect_url=settings.LOGIN_REDIRECT_URL): # Retrieve the tokens we want... authorized_tokens = twitter.get_authorized_tokens( - request.session['request_token']['oauth_verifier']) + request.session['request_verifier']) # If they already exist, grab them, login and redirect to a page displaying stuff. try: