Fix a regression issue orca couldn't login into BBL cloud (#13407)

* Add ticket-based OAuth flow for third-party login in HttpServer

* Fix legacy plugin login
This commit is contained in:
SoftFever
2026-04-30 16:12:08 +08:00
committed by GitHub
parent dae0694e90
commit d78ad8c44e
14 changed files with 162 additions and 8 deletions

View File

@@ -2502,7 +2502,7 @@ std::map<std::string, std::string> GUI_App::get_extra_header()
std::map<std::string, std::string> extra_headers;
extra_headers.insert(std::make_pair("X-BBL-Client-Type", "slicer"));
extra_headers.insert(std::make_pair("X-BBL-Client-Name", SLIC3R_APP_NAME));
extra_headers.insert(std::make_pair("X-BBL-Client-Version", VersionInfo::convert_full_version(SLIC3R_VERSION)));
extra_headers.insert(std::make_pair("X-BBL-Client-Version", get_bbl_client_version()));
#if defined(__WINDOWS__)
#ifdef _M_X64
extra_headers.insert(std::make_pair("X-BBL-OS-Type", "windows"));
@@ -2524,6 +2524,16 @@ std::map<std::string, std::string> GUI_App::get_extra_header()
return extra_headers;
}
std::string GUI_App::get_bbl_client_version()
{
if (BBLNetworkPlugin::instance().get_get_my_token() == nullptr) {
// Legacy Bambu plugin lacks bambu_network_get_my_token. Pin client
// version so the auth server keeps using the ?access_token= redirect.
return "01.10.01.50";
}
return VersionInfo::convert_full_version(SLIC3R_VERSION);
}
//BBS
void GUI_App::init_http_extra_header()
{