fix: recover desktop session env for browser auth

This commit is contained in:
Kevin Yue committed 2026-06-19 23:25:05 +08:00
1 parent 888dc93643
commit a7a5d9bf96
7 files changed
+269 -8

No files matched your search

+5 -2
View File
@@ -140,7 +140,7 @@ impl ConnectHandler<'_> {
gp_params.set_is_gateway(true);
let prelogin = prelogin(gateway, &gp_params, self.prelogin_options(false)).await?;
let cred = self.obtain_credential(&prelogin, gateway).await?;
let cred = self.obtain_credential(&prelogin, gateway, false).await?;
let login_session = self
.login_gateway(gateway, &cred, &gp_params, gateway_context.as_ref())
@@ -218,7 +218,10 @@ impl ConnectHandler<'_> {
info!("Portal config did not provide gateway auth cookies; using gateway prelogin flow");
}
let gateway_cred = match self.obtain_credential(&gateway_prelogin, gateway).await {
let gateway_cred = match self
.obtain_credential(&gateway_prelogin, gateway, portal_default_browser_enabled)
.await
{
Ok(cred) => cred,
Err(err) => {
self.print_direct_gateway_recommendation(gateway);