Skip to content

Commit

Permalink
fix: Remove deleting keys from login_session in gdisconnect()
Browse files Browse the repository at this point in the history
The current code deletes keys from login_session in both
disconnect() and gdisconnect(), which leads to an error
when the user tries to logout. To fix this issue and to
match the Facebook code, I have removed all the deletions
from the gdisconnect() function.
  • Loading branch information
SteveWooding committed Nov 21, 2017
1 parent 402a6a6 commit f229f6d
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions Lesson4/step2/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,11 +251,6 @@ def gdisconnect():
h = httplib2.Http()
result = h.request(url, 'GET')[0]
if result['status'] == '200':
del login_session['access_token']
del login_session['gplus_id']
del login_session['username']
del login_session['email']
del login_session['picture']
response = make_response(json.dumps('Successfully disconnected.'), 200)
response.headers['Content-Type'] = 'application/json'
return response
Expand Down

0 comments on commit f229f6d

Please sign in to comment.