def METHOD_NAME(response, backend, strategy, user, organization, *args, **kwargs):
    from apps.slack.models import SlackUserIdentity
    # Continue pipeline step only if it was installation
    if backend.name != "slack-login":
        return
    slack_team_identity = organization.slack_team_identity
    slack_user_id = response["authed_user"]["id"]
    redirect_to = "/a/grafana-oncall-app/users/me/"
    base_url_to_redirect = urljoin(organization.grafana_url, redirect_to)
    if slack_team_identity is None:
        # means that organization doesn't have slack integration, so user cannot connect their account to slack
        return HttpResponse(status=status.HTTP_400_BAD_REQUEST)
    if slack_team_identity.slack_id != response["team"]["id"]:
        # means that user authed in another slack workspace that is not connected to their organization
        # change redirect url to show user error message and save it in session param
        url = base_url_to_redirect + f"?slack_error={SLACK_AUTH_WRONG_WORKSPACE_ERROR}"
        strategy.session[REDIRECT_FIELD_NAME] = url
        return HttpResponse(status=status.HTTP_400_BAD_REQUEST)
    if organization.users.filter(slack_user_identity__slack_id=slack_user_id).exists():
        # means that slack user has already been connected to another user in current organization
        url = base_url_to_redirect + f"?slack_error={SLACK_AUTH_SLACK_USER_ALREADY_CONNECTED_ERROR}"
        strategy.session[REDIRECT_FIELD_NAME] = url
        return HttpResponse(status=status.HTTP_400_BAD_REQUEST)
    slack_user_identity, _ = SlackUserIdentity.objects.get_or_create(
        slack_id=slack_user_id,
        slack_team_identity=slack_team_identity,
        defaults={
            "cached_slack_email": response["user"]["email"],
        },
    )
    write_chatops_insight_log(
        author=user,
        event_name=ChatOpsEvent.USER_LINKED,
        chatops_type=ChatOpsTypePlug.SLACK.value,
        linked_user=user.username,
        linked_user_id=user.public_primary_key,
    )
    user.slack_user_identity = slack_user_identity
    user.save(update_fields=["slack_user_identity"])
    slack_user_identity.update_profile_info()