From a751c0e03a501f78ece7fc7599da9b3d5ff7af1a Mon Sep 17 00:00:00 2001 From: Michele Comitini Date: Thu, 24 Jan 2013 01:42:58 +0100 Subject: [PATCH] Compliance with rfc6749. Added backward compatibility with Facebook custom implementation. Simpler and faster flow. --- gluon/contrib/login_methods/oauth20_account.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gluon/contrib/login_methods/oauth20_account.py b/gluon/contrib/login_methods/oauth20_account.py index f9b04ecf..abc8f418 100644 --- a/gluon/contrib/login_methods/oauth20_account.py +++ b/gluon/contrib/login_methods/oauth20_account.py @@ -167,7 +167,8 @@ server for requests. It can be used for the optional"scope" parameters for Face tmp = e.read() raise Exception(tmp) finally: - del current.session.code # throw it away + if current.session.code: + del current.session.code # throw it away if open_url: try: