Tailscale Auth Key Logic

Nucleic-Session: 5360EC95-9A29-4CB4-8061-E869AC2BC518
Co-authored-by: Nucleic <[email protected]>
This commit is contained in:
2026-07-04 18:36:00 -07:00
co-authored by Nucleic
parent 60c59bc8ba
commit e463489b62
@@ -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") {