From f229f6d08f460d1240e30ffbccb1037cb9ce9559 Mon Sep 17 00:00:00 2001 From: Steven Wooding Date: Tue, 21 Nov 2017 11:53:51 +0000 Subject: [PATCH] fix: Remove deleting keys from login_session in gdisconnect() 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. --- Lesson4/step2/project.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Lesson4/step2/project.py b/Lesson4/step2/project.py index 9903498..f4440b0 100644 --- a/Lesson4/step2/project.py +++ b/Lesson4/step2/project.py @@ -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