Пример #1
0
def get_google_person(flow: client.Flow):
    """Get Google person from the Google flow object."""
    credentials = flow.step2_exchange(request.args.get('code'))
    session['credentials'] = credentials.to_json()

    http = credentials.authorize(httplib2.Http())
    return service.people().get(userId='me').execute(http=http)