def METHOD_NAME(user, *, challenge, rp_name, rp_id):
    """
    Returns a dictionary of options for credential creation
    on the client side.
    """
    _authenticator_selection = AuthenticatorSelectionCriteria()
    _authenticator_selection.user_verification = UserVerificationRequirement.DISCOURAGED
    options = pywebauthn.generate_registration_options(
        rp_id=rp_id,
        rp_name=rp_name,
        user_id=str(user.id),
        user_name=user.username,
        user_display_name=user.name or user.username,
        challenge=challenge,
        attestation=AttestationConveyancePreference.NONE,
        authenticator_selection=_authenticator_selection,
    )
    return json.loads(options_to_json(options))