From b259250488725e154e3aa9cef42ccba279e2e032 Mon Sep 17 00:00:00 2001 From: Matthieu Napoli Date: Sat, 31 Oct 2026 11:04:16 +0100 Subject: [PATCH 1/2] feat: say the app's name when asking /dev/null to approve the Mac --- Sources/DevNull/App/Session.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Sources/DevNull/App/Session.swift b/Sources/DevNull/App/Session.swift index ed3ab2b..00b5c51 100644 --- a/Sources/DevNull/App/Session.swift +++ b/Sources/DevNull/App/Session.swift @@ -87,6 +87,8 @@ final class Session { components.queryItems = [ URLQueryItem(name: "fingerprint", value: key.fingerprint), URLQueryItem(name: "device_name", value: String((Host.current().localizedName ?? "Mac").prefix(100))), + // So Settings → Devices can tell this app from others on the same Mac. + URLQueryItem(name: "app_name", value: "/dev/null for Mac"), URLQueryItem(name: "code_challenge", value: challenge), URLQueryItem(name: "code_challenge_method", value: "S256"), URLQueryItem(name: "state", value: state), From 8f4d48fdfa931bdc432272dda313d2752810b8f1 Mon Sep 17 00:00:00 2001 From: Matthieu Napoli Date: Sat, 31 Oct 2026 11:34:14 +0100 Subject: [PATCH 2/2] feat: say the app's id too, which stays when its name changes --- Sources/DevNull/App/Session.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Sources/DevNull/App/Session.swift b/Sources/DevNull/App/Session.swift index 00b5c51..0f80657 100644 --- a/Sources/DevNull/App/Session.swift +++ b/Sources/DevNull/App/Session.swift @@ -87,8 +87,9 @@ final class Session { components.queryItems = [ URLQueryItem(name: "fingerprint", value: key.fingerprint), URLQueryItem(name: "device_name", value: String((Host.current().localizedName ?? "Mac").prefix(100))), - // So Settings → Devices can tell this app from others on the same Mac. + // So Settings → Devices can tell this app from others on the same Mac. The id stays when the name changes. URLQueryItem(name: "app_name", value: "/dev/null for Mac"), + URLQueryItem(name: "app_id", value: "macos:" + (Bundle.main.bundleIdentifier ?? "sh.dev-null.mac")), URLQueryItem(name: "code_challenge", value: challenge), URLQueryItem(name: "code_challenge_method", value: "S256"), URLQueryItem(name: "state", value: state),