'Deletes current backend from user if associated.
Override if extra operations are needed.'

def disconnect(self, user, association_id=None):

    name = self.AUTH_BACKEND.name
    do_revoke = setting('SOCIAL_AUTH_REVOKE_TOKENS_ON_DISCONNECT')
    filter_args = {}
    if association_id:
        filter_args['id'] = association_id
    else:
        filter_args['provider'] = name
    instances = UserSocialAuth.get_social_auth_for_user(user).filter(**filter_args)
    if do_revoke:
        for instance in instances:
            instance.revoke_token(drop_token=False)
    instances.delete()
