[BangPypers] GAE python oauth login
VIMAL K
vimal.k at ieee.org
Mon Jul 21 11:55:31 CEST 2014
I want to implement google oauth login service to my application. Can
anyone help me with it. I have written func, please help me to continue
with it.
The code i've written:
def google_login(self):
flow = OAuth2WebServerFlow(
client_id='client-code',
client_secret='client secret',
redirect_uri='--url--',
scope='',
user_agent='')
authorize_url = flow.step1_get_authorize_url()
self.redirect(authorize_url)
credentials = flow.step2_exchange(self.request.params)
storage = Storage('a_credentials_file')
storage.put(credentials)
http = httplib2.Http()
https = credentials.authorize(http)
service = build('calendar', 'v3', http=http)
credentials = storage.get()
More information about the BangPypers
mailing list