Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
f908234
test(runtime): add Electron smoke guard for renderer diagnostics
simonhagger Feb 12, 2026
83e037b
feat(contracts): add auth IPC contract schemas for OIDC phase 1
simonhagger Feb 12, 2026
83ac001
feat(desktop): add auth IPC channels and preload/main stubs
simonhagger Feb 12, 2026
9d71e0d
feat(auth): implement OIDC PKCE flow with secure token storage
simonhagger Feb 12, 2026
e5fb650
feat(api): support OIDC session token auth in gateway
simonhagger Feb 12, 2026
5bfee5d
feat(renderer): include auth session probe in IPC diagnostics
simonhagger Feb 12, 2026
d50cee4
docs(readme): document OIDC env setup and runtime behavior
simonhagger Feb 12, 2026
183634d
chore(devx): auto-load .env.local for desktop dev on Windows
simonhagger Feb 12, 2026
927dce1
fix(auth): bridge clerk sign-in redirect route for desktop OIDC
simonhagger Feb 12, 2026
540e920
fix(auth): use extended IPC timeout for interactive sign-in flow
simonhagger Feb 12, 2026
bc23b65
fix(auth): redirect sign-in bridge to Clerk hosted sign-in page
simonhagger Feb 12, 2026
e275095
fix(auth): prevent redundant sign-in and avoid full session UI lock
simonhagger Feb 12, 2026
4c73ba9
feat(auth): add token diagnostics IPC and dev-only session diagnostic…
simonhagger Feb 12, 2026
daedb84
docs(security): track temporary audience compatibility and sanitize i…
simonhagger Feb 12, 2026
59c01af
test(security): add API auth regression cases for oidc audience valid…
simonhagger Feb 12, 2026
11d9f71
chore(git): tighten ignore rules for env and test artifacts
simonhagger Feb 12, 2026
340a6e4
chore(workspace): commit remaining catch-up updates
simonhagger Feb 12, 2026
2fb1049
docs(governance): add backlog item for IdP global sign-out hardening
simonhagger Feb 12, 2026
623eea6
fix(auth): dedupe token refresh and revoke refresh token on sign-out
simonhagger Feb 12, 2026
7dd8f7e
feat(diagnostics): expose electron runtime versions in IPC diagnostics
simonhagger Feb 12, 2026
553e517
fix(diagnostics): source app metadata version from package metadata
simonhagger Feb 12, 2026
bb6c8f5
feat(auth): add jwt route guards with safe post-login return routing
simonhagger Feb 12, 2026
d67ae35
feat(desktop): add build flavors, labs nav toggle, and docs updates
simonhagger Feb 12, 2026
4dc791a
chore(ci): exclude lockfile from prettier format checks
simonhagger Feb 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Copy this file to ".env.local" and set values for local development.

OIDC_ISSUER=https://your-issuer.example.com
OIDC_CLIENT_ID=your-client-id
OIDC_REDIRECT_URI=http://127.0.0.1:42813/callback
OIDC_SCOPES=openid profile email offline_access
OIDC_AUDIENCE=your-api-audience
# Optional:
# OIDC_SEND_AUDIENCE_IN_AUTHORIZE=1
# OIDC_API_BEARER_TOKEN_SOURCE=access_token
# OIDC_ALLOW_INSECURE_TOKEN_STORAGE=1
14 changes: 11 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ testem.log
.DS_Store
Thumbs.db

.nx/cache
.nx/workspace-data
/.nx/*

.angular

Expand All @@ -49,4 +48,13 @@ __screenshots__/
vitest.config.*.timestamp*

FILE_INDEX.txt
FEEDBACK.md
FEEDBACK.md

# local environment configuration
.env*
!.env.example
!.env.*.example

# e2e and test artifacts
playwright-report/
test-results/
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
/.nx/cache
/.nx/workspace-data
.angular
pnpm-lock.yaml
25 changes: 1 addition & 24 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,30 +16,7 @@
},
"chat.mcp.serverSampling": {
"electron/.vscode/mcp.json: angular-cli": {
"allowedModels": [
"copilot/claude-sonnet-4.5",
"copilot/auto",
"copilot/claude-haiku-4.5",
"copilot/claude-opus-4.5",
"copilot/claude-opus-4.6",
"copilot/claude-sonnet-4",
"copilot/gemini-2.5-pro",
"copilot/gemini-3-flash-preview",
"copilot/gemini-3-pro-preview",
"copilot/gpt-4.1",
"copilot/gpt-4o",
"copilot/gpt-5",
"copilot/gpt-5-mini",
"copilot/gpt-5-codex",
"copilot/gpt-5.1",
"copilot/gpt-5.1-codex",
"copilot/gpt-5.1-codex-max",
"copilot/gpt-5.1-codex-mini",
"copilot/gpt-5.2",
"copilot/gpt-5.2-codex",
"copilot/grok-code-fast-1",
"copilot/oswe-vscode-prime"
]
"allowedModels": []
},
"electron/.vscode/mcp.json: chrome-devtools": {
"allowedModels": [
Expand Down
84 changes: 65 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,53 +41,99 @@ pnpm install

## Common Commands

Quality gates:
Core workflow:

```bash
pnpm install
pnpm desktop:dev:win
```

Quality and CI-style checks:

```bash
pnpm lint
pnpm unit-test
pnpm integration-test
pnpm e2e-smoke
pnpm build
pnpm ci:local
```

Renderer-only dev:
Targeted dev commands:

```bash
pnpm renderer:serve
pnpm desktop:serve-all
pnpm workspace:refresh:win
```

Desktop dev (Windows one-command flow):
Packaging commands:

```bash
pnpm desktop:dev:win
pnpm forge:make
pnpm forge:make:staging
pnpm forge:make:production
```

Windows packaging (deterministic clean + make):
Build flavor behavior:

```bash
pnpm forge:make
```
- `forge:make:staging`
- sets `APP_ENV=staging`
- enables packaged DevTools (`DESKTOP_ENABLE_DEVTOOLS=1`)
- outputs a staging executable name (`Angulectron-Staging.exe`)
- `forge:make:production`
- sets `APP_ENV=production`
- disables packaged DevTools (`DESKTOP_ENABLE_DEVTOOLS=0`)
- outputs locked-down production artifacts

Packaging notes:

- `forge:make` now runs `forge:clean` first to remove stale outputs from `out/`.
- Packaging runs `forge:clean` first to remove stale outputs from `out/`.
- Windows distributable is ZIP-based (no interactive installer prompts).
- Output ZIP location:
- `out/make/zip/win32/x64/`
- filename pattern: `@electron-foundation-source-win32-x64-<version>.zip`
- Extract the ZIP, then run:
- `Angulectron.exe`
- Extract the ZIP and run the generated executable from the extracted folder.
- Custom app icon source path:
- `build/icon.ico`

If local Nx state gets stuck/locked on Windows:
## OIDC Authentication (Desktop)

```bash
pnpm workspace:refresh:win
```
OIDC support is implemented in main/preload with Authorization Code + PKCE.

Then relaunch desktop dev:
Required environment variables:

```bash
pnpm desktop:dev:win
```
- `OIDC_ISSUER`
- `OIDC_CLIENT_ID`
- `OIDC_REDIRECT_URI` (loopback URI, for example `http://127.0.0.1:42813/callback`)
- `OIDC_SCOPES` (must include `openid`)

Optional:

- `OIDC_AUDIENCE`
- `OIDC_ALLOW_INSECURE_TOKEN_STORAGE=1` (development-only fallback when OS secure storage is unavailable)

Recommended local setup:

1. Copy `.env.example` to `.env.local`.
2. Fill in your OIDC values.
3. Run `pnpm desktop:dev:win`.

`desktop:dev:win` now auto-loads `.env` and `.env.local` (with `.env.local` taking precedence).

Runtime behavior:

- Refresh tokens are stored in OS secure storage on Windows (`keytar`) with encrypted file fallback.
- Renderer can only call `desktop.auth.signIn()`, `desktop.auth.signOut()`, and `desktop.auth.getSessionSummary()`.
- Access token attachment for secured API operations occurs in main process only.

Temporary compatibility note:

- Current Clerk OAuth flow may issue JWT access tokens without API `aud` claim in this tenant.
- AWS JWT authorizer is temporarily configured to accept both:
- API audience (`YOUR_API_AUDIENCE`)
- OAuth client id (`YOUR_OAUTH_CLIENT_ID`)
- This is tracked for removal in `docs/05-governance/backlog.md` (`BL-014`) and `docs/05-governance/oidc-auth-backlog.md`.

## Repository Layout

Expand Down
Loading