Skip to content

refactor(auth): move platform-jwt to src/shared/auth - #707

Open
robspan wants to merge 1 commit into
mainfrom
refactor/platform-jwt-shared
Open

robspan wants to merge 1 commit into
mainfrom
refactor/platform-jwt-shared

Conversation

@robspan

@robspan robspan commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

First of three PRs for the desktop platform sign-in (#295), as agreed in the issue: platform-jwt moves to src/shared/ before anything else.

What

src/web/server/platform-jwt.ts moves unchanged to src/shared/auth/platform-jwt.ts, with a header that says it is Node only (node:crypto), so the renderer does not import it. The web server's platform identity service imports it from there.

Existing files touched

File Lines Why
src/web/server/platform-identity.ts +1/−1 the new import path

Verification

Against main at 779a6d25 (v0.91.0):

  • electron-vite build: out/main (55 of 55 files), out/preload (1 of 1) and out/renderer (114 of 114) are byte-identical to main.
  • Vitest (main and renderer projects), compared test by test with main: no test changes status.

Stack

  1. this PR
  2. feat(auth): desktop auth mode, access gate and admin config file #708 auth mode, access gate and admin config file (based on this branch)
  3. feat(auth): desktop platform sign-in, data binding and lock #709 sign-in, data binding and lock (based on feat(auth): desktop auth mode, access gate and admin config file #708)

The desktop sign-in (#295) needs the same RS256 and MFA claim checks as
the web server. Move the module unchanged so both can import it; the web
server's platform identity service now imports it from src/shared/auth.

No behavior change. The module stays Node only (node:crypto), which its
new header states so the renderer does not import it.

This branch has not been deployed

No deployments
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