Google Oauth 2 with multiple users in Google App Engine

2 views
Skip to first unread message

lowcoupling via StackOverflow

unread,
Mar 14, 2015, 4:04:43 AM3/14/15
to google-appengin...@googlegroups.com

I am working on a Google App Engine application (Python web app2) using the Google Client Api library to access calendar and drive. My problem is that when changing the authenticated user it happens that I get the calendars of user B while the logged user is user A.

here is a chunk of the whole code

ClientID = users.get_current_user().user_id()
credentials = StorageByKeyName(CredentialsModel, ClientID, 'credentials').get()
cservice = build('calendar', 'v3',http = credentials.authorize(httplib2.Http()))
calendar_list = cservice.calendarList().list(pageToken=page_token).execute(http = credentials.authorize(httplib2.Http()))

calendar_items = calendar_list["items"]

this comes after a long struggle you can find here Managing users authentication in Google App Engine

which led me to the attempt of removing decorators and getting credentials by my self. Unfortunately it doesn't seem to work



Please DO NOT REPLY directly to this email but go to StackOverflow:
http://stackoverflow.com/questions/29046799/google-oauth-2-with-multiple-users-in-google-app-engine

lowcoupling via StackOverflow

unread,
Mar 14, 2015, 10:35:38 PM3/14/15
to google-appengin...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages