From e463489b623035939321d53ab93b756ad3a79052 Mon Sep 17 00:00:00 2001 From: Andrew Blakeslee Moore Date: Sat, 4 Jul 2026 18:36:00 -0700 Subject: [PATCH] Tailscale Auth Key Logic Nucleic-Session: 5360EC95-9A29-4CB4-8061-E869AC2BC518 Co-authored-by: Nucleic --- .../NucleicRemote/Views/SettingsView.swift | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/NucleicRemote/NucleicRemote/Views/SettingsView.swift b/NucleicRemote/NucleicRemote/Views/SettingsView.swift index b58ea39..baf9980 100644 --- a/NucleicRemote/NucleicRemote/Views/SettingsView.swift +++ b/NucleicRemote/NucleicRemote/Views/SettingsView.swift @@ -104,16 +104,6 @@ struct SettingsView: View { Section { if TailnetSupport.isBuiltIn { - // Commit on editing end, not per keystroke — a per-change save would - // clear the valid Keychain key on the first backspace of an edit. - SecureField("Auth key (tskey-auth-…)", text: $tailscaleAuthKey) - .autocorrectionDisabled() - .textInputAutocapitalization(.never) - .focused($tailscaleKeyFocused) - .onSubmit { TailnetAuthStore.saveAuthKey(tailscaleAuthKey) } - .onChange(of: tailscaleKeyFocused) { - if !tailscaleKeyFocused { TailnetAuthStore.saveAuthKey(tailscaleAuthKey) } - } if let status = store.tailnetStatus { LabeledContent("Node", value: status) } @@ -121,6 +111,9 @@ struct SettingsView: View { Link(destination: loginURL) { Label("Open Tailscale login", systemImage: "arrow.up.forward.app") } + } else { + Text("No setup needed — when your Mac shares over Tailscale, this iPhone joins your tailnet on first connect and opens a browser login to approve itself.") + .font(.caption).foregroundStyle(.secondary) } } else { Text("This build doesn't include Tailscale support.") @@ -129,7 +122,7 @@ struct SettingsView: View { } header: { Text("Tailscale") } footer: { - Text("Needed only when your Mac shares over Tailscale (Mac ▸ Settings ▸ Remote ▸ Connect via). Leave the key empty to approve this iPhone in your browser on first connect, or create an auth key in the Tailscale admin console (kept in the Keychain, used once to join your tailnet).") + Text("Needed only when your Mac shares over Tailscale (Mac ▸ Settings ▸ Remote ▸ Connection methods). This iPhone joins your tailnet in the browser on first connect.") } Section("This device") {