feat: LAN mode with rotating single-use 30s invite tokens#32
Merged
Conversation
…s (30s) - Tokens rotate every 30 seconds and are immediately invalidated after use - QR code now encodes invite URL with current token (?invite=...) - Non-loopback LAN clients must present a valid unconsumed token to authenticate - Desktop localhost access remains tokenless for convenience - Settings > Network now shows current invite link + live-updating QR - Frontend auto-detects token from URL, sends it on auth, cleans URL after use - Polling keeps the invite QR fresh while viewing settings Also includes earlier LAN binding (0.0.0.0) and mobile UI responsiveness improvements (sidebar collapse, aux panels via page layout on small screens). Tested: pnpm build succeeds, Go builds and basic flows verified.
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.
This PR implements secure LAN access using a rotating single-use invite token (30s lifetime).
Changes
Rotating Invite Tokens
lan.Managergenerates a cryptographically secure random token that rotates every 30 seconds./auth/localconsumption.QR Code + Invite Flow
http://LAN-IP:port/?invite=TOKEN?invite(or?token) param on load, passes it toensureLocalAuth.history.replaceState).Auth Hardening for LAN
/auth/localnow accepts optional{ \"token\": \"...\" }body.LAN Binding
--lan/--exposeflag binds to 0.0.0.0 and advertises discovered private IPs.NetworkSettingsresponse now includeslanMode,lanUrls,lanIps, andinviteUrl.Mobile UI Improvements
h-dvhand responsive logic for better small-screen experience.How to Test
pnpm build cd apps/server-go go run ./cmd/workbench-cli --lan --http -yDesktop localhost flow remains unchanged for convenience.
Related