We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3fada33 commit 39e2a4eCopy full SHA for 39e2a4e
samples/appengine/main.py
@@ -33,8 +33,6 @@
33
from google.appengine.ext.webapp import util
34
from google.appengine.ext.webapp.util import login_required
35
36
-STEP2_URI = 'http://%s.appspot.com/auth_return' % os.environ['APPLICATION_ID']
37
-
38
39
class Flow(db.Model):
40
# FlowThreeLegged could also be stored in memcache.
@@ -77,7 +75,8 @@ def get(self):
77
75
scope='https://www.googleapis.com/auth/buzz',
78
76
xoauth_displayname='Example Web App')
79
80
- authorize_url = flow.step1_get_authorize_url(STEP2_URI)
+ callback = self.request.relative_url('/auth_return')
+ authorize_url = flow.step1_get_authorize_url(callback)
81
f = Flow(key_name=user.user_id(), flow=flow)
82
f.put()
83
self.redirect(authorize_url)
0 commit comments