def METHOD_NAME(self, source: OAuthSource, request: HttpRequest) -> Challenge:
    """Pre-general all the things required for the JS SDK"""
    apple_client = AppleOAuthClient(
        source,
        request,
        callback=reverse(
            "authentik_sources_oauth:oauth-client-callback",
            kwargs={"source_slug": source.slug},
        ),
    )
    args = apple_client.get_redirect_args()
    return AppleLoginChallenge(
        instance={
            "client_id": apple_client.get_client_id(),
            "scope": "name email",
            "redirect_uri": args["redirect_uri"],
            "state": args["state"],
            "type": ChallengeTypes.NATIVE.value,
        }
    )