Skip to content

Offline license mode (.lic import) - #3

Merged
catsika merged 2 commits into
mainfrom
feat/offline-license
Oct 26, 2026
Merged

catsika merged 2 commits into
mainfrom
feat/offline-license

Conversation

@catsika

@catsika catsika commented Oct 26, 2026

Copy link
Copy Markdown
Member

Adds offline licenses using verifyOfflineLicense from keymint 1.7.0.

  • Activation dialog: Import offline license (.lic). The file is verified in the main process against KEYMINT_PUBLIC_KEY, KEYMINT_PRODUCT_ID and the existing installation ID (getHostId()), then kept in the encrypted store.
  • Re-checked on launch and every 24 hours with now = max(system time, lastTrustedAt); lastTrustedAt is stored after each successful check.
  • Messages: expired (get a newly signed file), wrong machine, wrong product, anything else is an invalid file. Missing or bad config says so.
  • App page shows the offline expiry. deactivate with an offline license just forgets the file.
  • Online activation is unchanged; offline is checked only when there's no online activation.
  • npm test (tsc + node --test) covers the glue with a throwaway key; added to CI. README: short "Offline Licenses" section.

Verified: build + unit tests; the glue agrees with 33/34 shared server fixtures (the other uses clockSkew: 0; the starter keeps the default 60 s); ran the app and drove import over DevTools: wrong machine, expired and valid files give the right messages, the main window opens and shows the expiry, and it stays licensed after a relaunch.

Not in this PR: npm run build doesn't copy src/renderer/*.html into dist/, so npm run dev opens blank windows on main too. I copied the files by hand to run it.

Adds an "Import offline license" path to the activation dialog. The file is
verified locally with verifyOfflineLicense against KEYMINT_PUBLIC_KEY, the
product ID and the existing installation ID, stored in the encrypted store,
and re-checked on launch and every 24 hours. Expiry is checked against
max(system time, last trusted time). Online activation is unchanged.
… windows

tsc only emits JavaScript, but main loads dist/renderer/*.html, so npm run dev
(and electron-builder) opened blank windows.
@catsika
catsika merged commit 9e26e48 into main Oct 26, 2026
2 checks passed
@catsika
catsika deleted the feat/offline-license branch October 26, 2026 06:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant