Files
geograsim/App/php/api
Adminator 5b91a5bf84 Admin-Login lokal: 2FA-PIN ohne Mailversand (Dev) + Mailer-Fehler abfangen
Problem: lokal konnte man sich nicht als Admin anmelden — der 2FA-PIN kam nie
an (kein SMTP), und Mailer::sendAdminPin() warf sogar eine Exception, die den
Login komplett abbrach (leere Antwort → „MFA fehlt").

- admin.php: Mailversand nur auf Prod + in try/catch (Mail-Fehler darf den
  Login NIE blocken). Lokal (!IS_PRODUCTION) wird der PIN als `devPin` in der
  Login-Antwort zurückgegeben — auf Prod NIEMALS (2FA bleibt Pflicht).
- admin.html: devPin wird lokal automatisch ins PIN-Feld vorausgefüllt + als
  Hinweis angezeigt.

Verifiziert (temp Test-Admin): login → devPin → verify → authenticated:true,
admin-weltkueche.html erreichbar. Prod unberührt (IS_PRODUCTION-Gate).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-19 19:13:22 +02:00
..