Skip to content

Commit

Permalink
Change oauth verifier logic
Browse files Browse the repository at this point in the history
  • Loading branch information
avsd committed Apr 10, 2013
1 parent 18bd03a commit 814170d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion twython_django_oauth/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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:
Expand Down

0 comments on commit 814170d

Please sign in to comment.