0

I'm trying out Tornado's GoogleOAuth2Mixin with the example code shown in the documentation. According to the docs, the function get_authenticated_user "Handles the login for the Google user, returning a user object." (emphasis mine), but the object I receive is a dictionary like so:

{
    u'access_token': u'...',
    u'expires_in': 3600,
    u'id_token': u'...',
    u'token_type': u'Bearer'
}

While this is helpful, and I know how to make another HTTP request with the access token to retrieve information about authenticating user, it seems like a bit of a stretch of the imagination to call this dictionary a "user object".

Is this really what I'm supposed to expect, and I'm now meant to go and get the user data myself with another request, or is something going wrong?

1 Answer 1

1

This function has never worked as documented, although now that it has existed so long in its current form the documentation, and not the code, will have to change. GoogleOAuth2Mixin.get_authenticated_user returns only the authentication data and you'll have to make a separate request for further details.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.