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