Files
mars3142 5995b316af
CI / build-and-push (push) Canceled after 0s
CI / deploy (push) Canceled after 0s
CI / check (push) Canceled after 41s
Require OIDC sign-in for every route
Every page now goes through hooks.server.ts's requireAuth, except
/healthz, /login and Auth.js's own /auth/* routes. A generic OIDC
provider (not the named Keycloak one) does the actual sign-in, so
swapping identity providers later is a config change, not a code one.

- src/auth.ts: OIDC provider + Auth.js session, with idToken/accessToken
  and a filtered role list carried into the session.
- routes/login: skips Auth.js's own provider-picker page - pointless
  with exactly one provider - and jumps straight to sign-in.
- routes/logout: ends both the local session and, via the IdP's
  discovered end_session_endpoint (RP-Initiated Logout, not a
  hardcoded Keycloak URL), its SSO session. A named "everywhere"
  action additionally revokes every session through Keycloak's Account
  API before signing out (best-effort, degrades gracefully elsewhere).
- account-menu.svelte / settings: show the real signed-in profile
  instead of the /nav.ts mock, and link out to the IdP's own
  account console instead of a fake editable profile form.
- /session.ts + tests: pure helpers (initials, primaryRole,
  filterRoles) kept separate from the Auth.js config so they're
  testable without spinning up a session.

Signed-off-by: Peter Siegmund <mars3142@noreply.mars3142.dev>
2026-09-04 22:28:27 +02:00

57 lines
1.6 KiB
JSON

{
"name": "findr-web",
"private": true,
"version": "0.0.1",
"type": "module",
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"prepare": "svelte-kit sync || echo ''",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "prettier --check . && eslint .",
"format": "prettier --write .",
"test": "vitest run"
},
"devDependencies": {
"@eslint/js": "^10.0.1",
"@fontsource-variable/noto-sans": "^5.3.0",
"@lucide/svelte": "^1.39.0",
"@sveltejs/adapter-node": "^5.5.4",
"@sveltejs/kit": "^2.63.0",
"@sveltejs/vite-plugin-svelte": "^7.1.2",
"@tailwindcss/vite": "^4.3.0",
"@types/node": "^22",
"clsx": "^2.1.1",
"eslint": "^10.4.1",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-svelte": "^3.19.0",
"globals": "^17.6.0",
"prettier": "^3.8.3",
"prettier-plugin-svelte": "^4.1.0",
"prettier-plugin-tailwindcss": "^0.8.0",
"shadcn-svelte": "^1.6.0",
"svelte": "^5.56.1",
"svelte-check": "^4.6.0",
"tailwind-merge": "^3.6.0",
"tailwind-variants": "^3.3.1",
"tailwindcss": "^4.3.0",
"tw-animate-css": "^1.4.0",
"typescript": "^6.0.3",
"typescript-eslint": "^8.60.1",
"vite": "^8.0.16",
"vitest": "^5.0.0"
},
"dependencies": {
"@auth/sveltekit": "^1.11.3",
"@fontsource/ibm-plex-mono": "^5.3.0",
"@fontsource/libre-caslon-display": "^5.3.0",
"@fontsource/libre-caslon-text": "^5.3.0",
"@internationalized/date": "^3.12.4",
"bits-ui": "^2.19.0",
"mode-watcher": "^1.1.0",
"svelte-sonner": "^1.2.1"
}
}