authomatic/providers/oauth2.py
def _x_credentials_parser(credentials, data):
        """
        We need to override this method to fix Facebooks naming deviation.
        """

        # Facebook returns "expires" instead of "expires_in".
        credentials.expire_in = data.get('expires')

        if data.get('token_type') == 'bearer':
            # TODO: cls is not available here, hardcode for now.
            credentials.token_type = 'Bearer'

        return credentials
def _x_credentials_parser(credentials, data):
        # Facebook returns "expires" instead of "expires_in".
        credentials.expire_in = data.get('expires')

        if data.get('token_type') == 'bearer':
            # TODO: cls is not available here, hardcode for now.
            credentials.token_type = 'Bearer'

        return credentials
def _x_credentials_parser ( credentials , data ) : # Facebook returns "expires" instead of "expires_in". credentials . expire_in = data . get ( 'expires' ) if data . get ( 'token_type' ) == 'bearer' : # TODO: cls is not available here, hardcode for now. credentials . token_type = 'Bearer' return credentials
We need to override this method to fix Facebooks naming deviation.
We need to override this method to fix Facebooks naming deviation .