'Build absolute URI for given path. Replace http:// schema with
https:// if SOCIAL_AUTH_REDIRECT_IS_HTTPS is defined.'

def build_absolute_uri(self, path=None):

    uri = self.request.build_absolute_uri(path)
    if setting('SOCIAL_AUTH_REDIRECT_IS_HTTPS'):
        uri = uri.replace('http://', 'https://')
    return uri
