Files
ausgaben-next/.env.example
T
admin d3718da1f8 V 2.2.1 Anmeldung per Passkey (WebAuthn)
Passkey-Login analog zu werte-next: auf der Login-Seite "Mit Passkey
anmelden", Verwaltung der eigenen Passkeys im neuen Tab Einstellungen.
Das Passwort bleibt als Alternative bestehen.

- lib/webauthn.ts, lib/passkeys.ts sowie API-Routen unter /api/passkey
- proxy.ts: /api/passkey/authenticate ohne Session erreichbar
- TabLayout: dritter Tab Einstellungen (Index-Tabs statt Route wie werte)
- RP-Konfiguration ueber AUSGABEN_RP_*, da sich die .env auf dem Server
  mit anderen Apps teilt, die RP_ID/RP_ORIGIN bereits belegen
- Eigene Tabelle ausgaben_passkeys aus demselben Grund: werte-next nutzt
  in der gemeinsamen Datenbank RXF bereits die Tabelle passkeys
- eslint.config.mjs auf die Flat-Config von eslint-config-next umgestellt

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-09 16:35:35 +02:00

31 lines
1.3 KiB
Bash

DB_HOST=localhost
DB_USER=root
DB_PASSWORD=your_password
DB_NAME=RXF
# Authentication Configuration
# Format: username:passwordHash,username2:passwordHash2 (max 5 users)
# Use 'node scripts/generate-password.js [password]' to generate hashes
# Leave empty to disable authentication
# Example hashes below (passwords: admin123, pass1):
AUTH_USERS=admin:$2b$10$DKLO7uQPmdAw9Z64NChro.8mOsnqZQaRZjctWDojIkK926ROBVyJW,user1:$2b$10$K613Z70Hodr6xyEh10Mw2uoRZMV3U4LIB09929JUWw2n/pXKoUqaW
# Secret key for JWT session encryption (change in production!)
AUTH_SECRET=your-super-secret-key-change-this-in-production
# Passkeys (WebAuthn) — Relying Party
# RP_ID = nur der Host (ohne Protokoll/Port), RP_ORIGIN = volle URL
#
# Bei "npm run dev" liest Next.js RP_ID/RP_ORIGIN/RP_NAME direkt aus dieser Datei.
# Ohne Angabe gilt localhost / http://localhost:3005 — für lokale Entwicklung
# können die Zeilen also entfallen.
# RP_ID=localhost
# RP_ORIGIN=http://localhost:3005
# Bei Docker Compose werden die AUSGABEN_RP_*-Variablen ausgewertet und im
# Container auf RP_* abgebildet. Eigene Namen deshalb, weil die .env auf dem
# Server mit anderen Apps geteilt wird, die RP_ID/RP_ORIGIN schon belegen.
AUSGABEN_RP_ID=ausgaben.fuerst-stuttgart.de
AUSGABEN_RP_ORIGIN=https://ausgaben.fuerst-stuttgart.de
AUSGABEN_RP_NAME=Ausgaben-Log