You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe the default decoder provided by RAuth.utils is incompatible with GooglePlus via OAuth2 decoding schema. Default RAuth decoder when used by GooglePlus, results in an empty dict {}.
I used this following decoder which seems to work just fine as I passed this into RAuth's get_auth_session() and got the desired tokens.
@staticmethod
def decoder(data: bytes, encoding: str='utf-8') -> dict:
"""
Provide a decoder for RAuth to invoke to unpack the response and decode accordingly
:param data: bytes
Byte data stream that needs to be decoded (handled by this decoder)
:param encoding: str
Encoding for the bytes
:return:
Dictionary with the values returned by Google Plus
:rtype: dict
"""
result = data.decode(encoding)
if result:
json = loads(result)
return json
else:
return {}
The text was updated successfully, but these errors were encountered:
I believe the default decoder provided by RAuth.utils is incompatible with GooglePlus via OAuth2 decoding schema. Default RAuth decoder when used by GooglePlus, results in an empty dict {}.
I used this following decoder which seems to work just fine as I passed this into RAuth's get_auth_session() and got the desired tokens.
The text was updated successfully, but these errors were encountered: