Add Better Auth admin authentication
This commit is contained in:
@@ -27,9 +27,17 @@ Copy `.env.example` to `.env.local` for local development. Keep real secrets out
|
||||
- **OpenRouter:** `OPENROUTER_API_KEY`
|
||||
- **SMTP / Stalwart:** `SMTP_HOST`, `SMTP_PORT`, `SMTP_USER`, `SMTP_PASSWORD`, `SMTP_FROM`
|
||||
- **Rybbit:** `RYBBIT_API_URL`, `RYBBIT_API_KEY`, `NEXT_PUBLIC_RYBBIT_SITE_ID`
|
||||
- **Auth:** `BETTER_AUTH_SECRET`
|
||||
|
||||
Only variables prefixed with `NEXT_PUBLIC_` are intended for browser exposure. All API keys, SMTP credentials, and server-only URLs must stay server-side.
|
||||
|
||||
### Admin Auth Flow
|
||||
|
||||
- `/login` handles Anmeldung mit dem bestehenden Admin-Account. Registrierung ist nach der Ersteinrichtung serverseitig deaktiviert.
|
||||
- Nach erfolgreicher Anmeldung wird auf `/dashboard` gewechselt.
|
||||
- Die Session wird im Layout/Middleware geprüft (`/dashboard` bleibt geschützt), öffentliche Audit-Routen bleiben weiterhin frei.
|
||||
- Für Passwortänderungen ist aktuell kein separater Endpunkt in der UI, daher für MVP bitte über administrativen Wartungsweg vorgehen.
|
||||
|
||||
## Routes
|
||||
|
||||
- `/` MVP entry page.
|
||||
|
||||
Reference in New Issue
Block a user