Skip to content

Latest commit

 

History

History
24 lines (19 loc) · 1.11 KB

File metadata and controls

24 lines (19 loc) · 1.11 KB

Qwik patcher

Integrates Zitadel auth into a Vite + Qwik single-page app.

What it patches

  • src/app.tsx — auth entry that renders the Zitadel login/logout widgets (lowercase app.tsx with a named App export, matching the create-vite Qwik entry mounted by main.tsx)
  • vite.config.* — merges the /__nextgen dev-server proxy into the first matching vite.config.{ts,mts,js,mjs}
  • .env.example, .env.localVITE_ZITADEL_PROJECT_ID (client-exposed), plus the shared ZITADEL_* keys the base patcher writes (ZITADEL_PROJECT_ID, ZITADEL_PROJECT_SECRET, ZITADEL_ISSUER, ZITADEL_URL, ZITADEL_ENVIRONMENT) — the dev proxy reads ZITADEL_PROJECT_SECRET
  • package.json — adds @zitadel/sdk-qwik

How the proxy works

The SDK widgets call /__nextgen/* same-origin. In dev, the Vite proxy forwards those to the backend and attaches the project service-key secret (read from ZITADEL_PROJECT_SECRET) only to POST /sessions/exchange. The production story is a platform rewrite plus the publishable key from ADR 036 (docs/adrs/036-api-credential-planes.md), tracked in issue #560.