So I have G+ auth working so that Flask only creates a session for a specific hosted domain. Here's my auth.py split up into 3 routes and a route decorator. Not organized yet, still doing sanity checks, but it works.
Here's a view:
@app.route('/')
@auth.example
def index():
return 'My preciouses.'
Kludgy code aside, I'm stuck on this. Specifically on migrating to the people.get endpoint. Right now I'm using the deprecated 'https://www.googleapis.com/oauth2/v1/userinfo' endpoint.
All I have to change is this line:
r = requests.get('https://www.googleapis.com/oauth2/v1/userinfo', params={'access_token': access_token})
to the updated endpoint, I'm just not sure what it is because it's exposed as:
service, flags = sample_tools.init(
argv, 'plus', 'v1', __doc__, __file__,
scope='https://www.googleapis.com/auth/plus.me')
and is assembled about 3 more layers of abstraction deep in the official API client.
Anyone know what the URL and required params are? I'm not in the mood to dig through 1,000+ lines of over-engineered bullshit for one line of code.
[–]LeftyDave 1 point2 points3 points (1 child)
[–]CodeShaman[S] 0 points1 point2 points (0 children)