Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
Skip to content
World desk4 min

Where License Validation Belongs in an Electron App

The server should make the authoritative license decision; the Electron main process requests and caches it, and the renderer only displays it. Here is how to design offline behavior and IPC safely.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Put the authoritative license decision on a server you control. The Electron app should ask that server, cache the answer for a defined period, and use the result to switch features on or off. Local checks in the renderer or main process are still useful for user experience and casual-tampering resistance, but they cannot prove that someone paid. This is an architectural conclusion drawn from the client/server model, not a rule stated in Electron’s documentation.

Why the installed app cannot be the authority

An Electron app runs on a machine the customer controls. Its JavaScript, bundled assets and any key shipped inside it can be inspected or altered by that person. If the full decision logic and every trusted secret live in the package, the check is a speed bump, not proof of payment. Electron’s security guidance explains that local code carries significant system power and that running untrusted code is dangerous, but it does not prescribe a licensing design. The conclusion here is general client/server reasoning.

As an Amazon Associate I earn from qualifying purchases.

Practical consequence: do not claim a local-only check is tamper-proof, and do not ship a private signing key or API credential in the app. A secret delivered to a customer-controlled client cannot stay secret in any strong sense.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What belongs in each layer

Renderer: presentation only

The renderer collects input (a license key, a sign-in) and displays states such as “licensed”, “expired” or “offline”. Treat anything it sends as potentially malformed or manipulated, and keep licensing secrets out of it.

#1 Best Overall

Main process: a narrow, validated gate

The main process should own the network request to your licensing service, or call a small, constrained licensing module. Expose it to the renderer through a deliberately small set of IPC handlers rather than broad Electron APIs. Electron is explicit about sender checks: “You should always validate incoming IPC messages sender property to ensure you aren’t performing actions or sending information to untrusted renderers.” Frames, including iframes in some scenarios, can send IPC messages, so validate the sender and the input before any privileged action. (Electron Security)

The same page warns: “A security issue exists whenever you receive code from an untrusted source (e.g. a remote server) and execute it locally.” Licensing responses should be data your app interprets, never code it executes.

Licensing service: the source of truth

For connected products, the service decides account status, subscription state, activation counts and revocation. It is the only place that can enforce those decisions for anything you serve remotely. The costs are real: availability requirements, operating expense, privacy obligations and support load. A recent DEV article illustrates the client-to-license-API pattern using a named hosted provider; that provider’s claims, pricing and security properties are unverified here, so treat it as an example of the pattern, not an endorsement.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Transport

Use HTTPS for every call to the service. Electron recommends secure protocols for resources not bundled with the app, and HTTPS gives integrity and eavesdropping protection in transit. (Electron Security)

Can an Electron app validate a license offline?

Yes, within limits. The usual approach is for the server to issue a signed entitlement artifact with a limited validity window. The app caches it and verifies the signature with an embedded public key. The app never needs the private signing key, because verification material can be public. This is a design recommendation; no source here verifies a specific implementation or a recommended validity period.

Offline behavior is a product policy, so decide and document it:

  • Does the app start offline at all?
  • How long is a cached entitlement honored before it must be refreshed?
  • What happens when a check fails because of a network error versus an explicit “not entitled” answer?
  • What happens on expiration or revocation: read-only mode, reduced features, or lockout?
  • How are clock changes, device migration and reinstalls handled?

An offline client cannot receive instant revocation. Revocation takes effect at the next successful refresh or when the cached artifact expires, whichever comes first. No source establishes a universally correct grace period.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Choosing a policy

Approach Revocation speed Outage tolerance Privacy footprint User friction
Online-only check Fast Low Highest (frequent contact) Highest when offline
Cached, signed entitlement with expiry Bounded by validity window High within the window Moderate Low to moderate
Perpetual local license None after issue Highest Lowest Lowest; weakest against sharing

Also weigh support burden, service operating cost and resistance to casual tampering. No single policy fits every product; subscriptions that gate server-side features suit the first two, while one-time purchases of fully local tools often suit the third.

Code signing does not prove entitlement

Code signing helps certify who built the app and that the distributed package is trusted. It says nothing about whether a given account or installation has an active subscription. Keep the two concerns separate. See Electron’s code signing and distribution overview pages for the packaging side; neither is a licensing specification.

Recommended pattern in short steps

  1. Authenticate the user or key against your service over HTTPS from the main process.
  2. Have the service return a signed, time-limited entitlement.
  3. Verify the signature locally with a public key and cache the result.
  4. Expose only a small IPC surface that reports state to the renderer, validating the sender on each handler.
  5. Gate features in the main process using the verified entitlement, and gate anything server-hosted on the server itself.
  6. Refresh on a schedule and on startup, and apply your documented expiry and offline rules.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.