OAuth for Google App Engine Python -


i've been reading documentation on how implement oauth gae python here: https://cloud.google.com/appengine/docs/python/oauth/#python_oauth_and_app_engine

the steps below make sense. have no idea how make work. want able access https://www.googleapis.com/oauth2/v1/userinfo user can store his/her email in app's ndb.

step 1: import oauth

from google.appengine.api import oauth

step 2: current user

user = oauth.get_current_user()

step 3: request token https://your_app_id.appspot.com/_ah/oauthgetrequesttoken

step 4: authorize token https://your_app_id.appspot.com/_ah/oauthauthorizetoken

step 5: access token https://your_app_id.appspot.com/_ah/oauthgetaccesstoken

step 6: information google 'https://www.googleapis.com/oauth2/v1/userinfo?alt=json&access_token=tokenwouldgohere

i can't find examples can use me solve problem. i've found, seems either import error or authentication error. example importerror: no module named oauth2client.client

i eternally grateful if write me sample or point me in right direction grab user's email address oauth2 using gae python. thank much!

this video helped me oauth working. using decorators simplifies whole process.


Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

qt - How to embed QML toolbar and menubar into QMainWindow -