Repository navigation
Set up another device: QR code and link with server, coordinator or settings - #243
Merged
Merged
Conversation
…dinator or settings The account sheet (Android) and the Settings account card (desktop) gain "Set up another device": a QR code of a hocket://setup link carrying the Navidrome server and user, the password only when switched on, and the coordinator, or without one the account settings changed from their defaults (packed: zlib + base64url). A new device scans it (Google code scanner, non-FOSS builds), opens it from the camera, or takes it pasted into the server field. Links opened from outside only fill the form; a signed-in device turns them away. Core: Query::SetupSettings and Command::ApplySetupSettings (account-synced keys only). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A hocket:// link any web page can open showed only the server and user, while its coordinator (which receives the account's credential when the device joins it) and settings were kept hidden and applied on Connect. Now only a scanned or pasted link brings them, and typing a server or user of one's own drops them. Also: Android never replays a setup link from Recents and reads the keystore off the main thread; both apps find a link pasted into a field that already holds an address; the desktop dialog offers no link until its settings are known, and turns away a link that arrived before a cold start's servers loaded. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds Set up another device to the account sheet on Android and to the account card in Settings on desktop. It shows a QR code of a
hocket://setuplink that hands the sign-in details to a new device.What the link holds
hocket://setup?server=…&user=…[&password=…][&coordinator=…][&settings=…]Using it on the new device
hocket://setuplink opened from another app only fills in the form. Any web page can open such a link, so it waits for you to press Connect. It also drops the link's coordinator and settings, because neither shows in the form and a coordinator receives the account's credential. Only a scanned or pasted link brings them, and typing your own server or user drops them.Core
Query::SetupSettingsreturns the account settings that differ from their defaults, as a JSON object.Command::ApplySetupSettingsapplies them. It takes account-level settings only and ignores device settings, unknown keys and invalid values.Tests
actor_library::setup_settings_carry_changed_synced_settings_to_a_new_device.SetupLinkTest, including reading a link the desktop packed.SetupDeviceTest: the sheet, opening and pasting links, applying settings, and turning a link away.setup-settings(including reading what Android packs),deep-linkandipc.e2e/setup-device.spec.ts.🤖 Generated with Claude Code