From 39d189b2138892c19c56430db83103033673c942 Mon Sep 17 00:00:00 2001 From: Zoltan Papp Date: Wed, 24 Jun 2026 01:53:32 +0200 Subject: [PATCH] fix(ios): preserve profile name when saving config during auth NewAuth built a fresh in-memory config from only the management URL, so the SSO/setup-key save (DirectWriteOutConfig) overwrote the profile config file the profile manager had just written, wiping the display name to "" and forcing the UI to fall back to the profile ID. Load the existing config when present and override only the management URL, keeping the name and keys. --- client/ios/NetBirdSDK/login.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/client/ios/NetBirdSDK/login.go b/client/ios/NetBirdSDK/login.go index 9d447ef3f..5e9b8fe1b 100644 --- a/client/ios/NetBirdSDK/login.go +++ b/client/ios/NetBirdSDK/login.go @@ -51,6 +51,12 @@ func NewAuth(cfgPath string, mgmURL string) (*Auth, error) { return nil, err } + // Preserve the existing profile config (name, keys) and override only the management URL. + if existing, err := profilemanager.GetConfig(cfgPath); err == nil { + existing.ManagementURL = cfg.ManagementURL + cfg = existing + } + return &Auth{ ctx: context.Background(), config: cfg,