async def METHOD_NAME(app: web.Application):
    """Resolves login settings by composing app and product configurations
    for the login plugin. Note that product settings override app settings.
    """
    # app plugin settings
    app_login_settings: LoginSettings | None
    login_settings_per_product: dict[ProductName, LoginSettingsForProduct] = {}
    if app_login_settings := app[APP_SETTINGS_KEY].WEBSERVER_LOGIN:
        assert app_login_settings, "setup_settings not called?"  # nosec
        assert isinstance(app_login_settings, LoginSettings)  # nosec
        # compose app and product settings
        errors = {}
        for product in list_products(app):
            try:
                login_settings_per_product[
                    product.name
                ] = LoginSettingsForProduct.create_from_composition(
                    app_login_settings=app_login_settings,
                    product_login_settings=product.login_settings,
                )
            except ValidationError as err:  # noqa: PERF203
                errors[product.name] = err
        if errors:
            msg = "\n".join([f"{n}: {e}" for n, e in errors.items()])
            error_msg = f"Invalid product.login_settings:\n{msg}"
            raise ValueError(error_msg)
    # store in app
    app[APP_LOGIN_SETTINGS_PER_PRODUCT_KEY] = login_settings_per_product
    log.info(
        "Captured products login settings:\n%s",
        json.dumps(
            {
                product_name: login_settings.dict()
                for product_name, login_settings in login_settings_per_product.items()
            },
            indent=1,
        ),
    )
    # product-based public config: Overrides  ApplicationSettings.public_dict
    public_data_per_product = {}
    for product_name, settings in login_settings_per_product.items():
        public_data_per_product[product_name] = {
            "invitation_required": settings.LOGIN_REGISTRATION_INVITATION_REQUIRED
        }
    app.setdefault(APP_PUBLIC_CONFIG_PER_PRODUCT, public_data_per_product)