def init_app(self, app: Flask, session: SessionBase) -> None:
        """
        Will initialize the Flask app, supporting the app factory pattern.

        :param app:
        :param session: The SQLAlchemy session

        """
        app.config.setdefault("APP_NAME", "F.A.B.")
        app.config.setdefault("APP_THEME", "")
        app.config.setdefault("APP_ICON", "")
        app.config.setdefault("LANGUAGES", {"en": {"flag": "gb", "name": "English"}})
        app.config.setdefault("ADDON_MANAGERS", [])
        app.config.setdefault("RATELIMIT_ENABLED", False)
        app.config.setdefault("FAB_API_MAX_PAGE_SIZE", 100)
        app.config.setdefault("FAB_BASE_TEMPLATE", self.base_template)
        app.config.setdefault("FAB_STATIC_FOLDER", self.static_folder)
        app.config.setdefault("FAB_STATIC_URL_PATH", self.static_url_path)

        self.app = app

        self.base_template = app.config.get("FAB_BASE_TEMPLATE", self.base_template)
        self.static_folder = app.config.get("FAB_STATIC_FOLDER", self.static_folder)
        self.static_url_path = app.config.get(
            "FAB_STATIC_URL_PATH", self.static_url_path
        )
        _index_view = app.config.get("FAB_INDEX_VIEW", None)
        if _index_view:
            self.indexview = dynamic_class_import(_index_view)  # type: ignore
        else:
            self.indexview = self.indexview or IndexView

        _menu = app.config.get("FAB_MENU", None)

        # Setup Menu
        if _menu is not None:
            menu = dynamic_class_import(_menu)
            if menu is not None and issubclass(menu, Menu):
                self.menu = menu()
        else:
            self.menu = self.menu or Menu()

        if self.update_perms:  # default is True, if False takes precedence from config
            self.update_perms = app.config.get("FAB_UPDATE_PERMS", True)
        _security_manager_class_name = app.config.get(
            "FAB_SECURITY_MANAGER_CLASS", None
        )
        if _security_manager_class_name is not None:
            security_manager_class = dynamic_class_import(_security_manager_class_name)
            self.security_manager_class = cast(
                Type["BaseSecurityManager"], security_manager_class
            )
        if self.security_manager_class is None:
            from flask_appbuilder.security.sqla.manager import SecurityManager

            self.security_manager_class = SecurityManager

        self._addon_managers = app.config["ADDON_MANAGERS"]
        self.session = session
        self.sm = self.security_manager_class(self)
        self.bm = BabelManager(self)
        self.openapi_manager = OpenApiManager(self)
        self.menuapi_manager = MenuApiManager(self)
        self._add_global_static()
        self._add_global_filters()
        app.before_request(self.sm.before_request)
        self._add_admin_views()
        self._add_addon_views()
        if self.app:
            self._add_menu_permissions()
        else:
            self.post_init()
        self._init_extension(app)

        Will initialize the Flask app, supporting the app factory pattern.

        :param app:
        :param session: The SQLAlchemy session

        
flask_appbuilder/base.py