Repair Tailscale authorization flow

This commit is contained in:
David Heinemeier Hansson
2026-07-17 10:20:08 -07:00
parent 16b5f2157f
commit fe48e83222
8 changed files with 167 additions and 9 deletions
+9
View File
@@ -59,6 +59,14 @@ function accountLabel(account) {
return String(account.id || "Unknown account")
}
function loginPlan(needsLogin, authUrl) {
var url = String(authUrl || "").trim()
if (needsLogin === true && /^https?:\/\//.test(url)) {
return { authUrl: url, command: [] }
}
return { authUrl: "", command: ["tailscale", "up"] }
}
function peerFromStatus(id, peer) {
return {
id: id,
@@ -270,6 +278,7 @@ if (typeof module !== "undefined") {
displayHostName: displayHostName,
osIcon: osIcon,
accountLabel: accountLabel,
loginPlan: loginPlan,
isMullvadPeer: isMullvadPeer,
peerFromStatus: peerFromStatus,
parseExitNodeList: parseExitNodeList,