Repository navigation
Conversation
…p links
`tauri dev` cannot receive the console's sqlkit:// handoff (URL schemes are
registered per app bundle) and the dev frontend's WebView localStorage is
origin-partitioned away from the installed app, so the debug app always
starts logged out and there is no way to complete the login flow in it.
The script bridges that with the backend's debug-only SQLKIT_DEV_AUTH_URL
hook, with two sources sharing one mechanism:
- default: extract the persisted login from the installed production app's
WebView localStorage (UTF-16LE decode, URL-encode) and target the
production console API — fast validation of the real entitlement chain;
- paste mode: take a sqlkit://auth?… link copied from the console handoff
dialog ("Copy Link") and point at a local console stack via --api or
SQLKIT_CONSOLE_API_URL — full-chain checks against geekfun's
scripts/dev-stack.sh.
Tokens never reach stdout; they live only in the child process environment.
--print-env writes a sourceable env file (0600) instead of launching.
Missing token/username/email in a pasted link fails loudly (mirrors
parse_auth_from_url) instead of silently logging the app out.
Member
Author
|
Retracted — developer tooling should not live in the public repo; keeping it internal. |
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.
Problem
npm run tauri devcan never be logged in:sqlkit://URL schemes are registered per app bundle — the console's handoff (window.location.href = 'sqlkit://auth?…') always reaches the installed app, never the dev binary (macOS; acknowledged inlib.rscomments).http://localhost:1521vs the installed app'stauri://localhost), so the persisted login does not carry over either.SQLKIT_CONSOLE_API_URLtolocalhost:5174(admin vite, no API routes).Fix
scripts/dev-login.shbridges the gap through the backend's existing debug-only injection hook (SQLKIT_DEV_AUTH_URL,#[cfg(debug_assertions)]), with two sources sharing one mechanism:scripts/dev-login.shscripts/dev-login.sh --api http://localhost:3000 '<sqlkit://auth?…>'scripts/dev-stack.sh)Details:
&/=)--print-envwrites a 0600 sourceable env file instead of launchingtoken/username/emailfails loudly (mirrorsparse_auth_from_url) instead of silently logging the app outVerified
--apitarget ✓parse_auth_from_urlexpects ✓Companion PR in geek-fun/geekfun adds the handoff "Copy Link" button and
scripts/dev-stack.sh(local postgres+API+admin stack) — together they make the local full-chain flow work end to end.