Repository navigation
feat: automatic portal login after connecting - #31
Merged
Merged
Conversation
added 2 commits
October 6, 2026 18:32
Open the portal with a fresh one-time login link from the server instead of the plain portal URL, for the auto-open after connect, the tray entry and the "Portal öffnen" button. Falls back to the portal URL when the server has no valid link (older server, error, timeout, foreign origin). - openPortalSafe() now uses core createPortalOpener(), which calls apiClient.getPortalLink() right before every open (no caching). - The renderer button calls window.gatecontrol.portal.open(); main fetches and opens the link, so the ticket never reaches the renderer. - core.ref pinned to the core commit that adds getPortalLink(). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016xX1efcZF1f6G9rhmaJNLD
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016xX1efcZF1f6G9rhmaJNLD
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.
Summary
The client now opens the portal with a one-time login link, so the user lands in the portal already signed in. This applies to:
the auto-open after connecting (
shouldOpenPortal→openPortalSafe());the tray entry;
the "Portal öffnen" button.
openPortalSafe()now usescreatePortalOpener()from the core. Right before every open, it callsapiClient.getPortalLink()(POST /api/v1/client/portal-linkwith the usual client headers). Every open fetches a fresh link; nothing is cached.It falls back to the plain
portalUrlon a non-2xx answer, a network error, a timeout over 5 s, a missingurl, or aurlwhose origin differs fromportalUrl. Only https URLs are opened, as before.The renderer button now calls
window.gatecontrol.portal.open()(newportal:openchannel, served by the core viactx.openPortal). The main process fetches and opens the link, so the ticket never reaches the renderer. The ticket is not logged or stored anywhere.Tests: the IPC test now covers
portal:open.core.refis pinned toc2f100745161dcd5994374b105ef49b4621c8c4c, the head of CallMeTechie/gatecontrol-client-core#18 (branchfeat/portal-auto-login). CI fetches that commit directly, so this PR builds and tests against it now.Before merging this PR: merge the core PR first, then bump
core.refto the resulting core master commit (npm run core:bump, orbash scripts/bump-core.sh <sha>) so the client does not stay pinned to a branch commit.🤖 Generated with Claude Code
https://claude.ai/code/session_016xX1efcZF1f6G9rhmaJNLD
Generated by Claude Code