🔒 refactor(bots): remove !login command and enforce OIDC-only auth

- Remove !login and !logout commands from all 16+ Matrix bots
- Remove login/logout references from all help/welcome messages
- Disable password login in Synapse (password_config.enabled: false)
- System is now OIDC-only via Mana Core authentication

Users must authenticate via "Sign in with Mana Core" in Element.
Existing bot access tokens remain valid.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Till-JS 2026-02-14 11:26:58 +01:00
parent c698318c91
commit d81b8aebf2
30 changed files with 158 additions and 786 deletions

View file

@ -241,15 +241,6 @@ Sag "hilfe" fur alle Befehle!`;
await this.sendHelp(roomId);
break;
case 'login':
await this.handleLogin(roomId, sender, args);
break;
case 'logout':
await this.sessionService.logout(sender);
await this.sendMessage(roomId, 'Du wurdest abgemeldet.');
break;
case 'analyze':
await this.handleAnalyze(roomId, sender, argString);
break;
@ -298,40 +289,6 @@ Sag "hilfe" fur alle Befehle!`;
await this.sendMessage(roomId, HELP_MESSAGE);
}
private async handleLogin(roomId: string, sender: string, args: string[]) {
if (args.length < 2) {
await this.sendMessage(
roomId,
`**Verwendung:** \`!login email passwort\`\n\nBeispiel: \`!login nutzer@example.com meinpasswort\``
);
return;
}
const [email, password] = args;
await this.sendMessage(roomId, 'Anmeldung lauft...');
const result = await this.sessionService.login(sender, email, password);
if (result.success) {
const token = await this.sessionService.getToken(sender);
if (token) {
const balance = await this.creditService.getBalance(token);
await this.sendMessage(
roomId,
`✅ Erfolgreich angemeldet als **${email}**\n⚡ Credits: ${balance.balance.toFixed(2)}\n\nDu kannst jetzt Fotos analysieren und deine Ernahrung tracken.`
);
} else {
await this.sendMessage(
roomId,
`✅ Erfolgreich angemeldet!\n\nDu kannst jetzt Fotos analysieren und deine Ernahrung tracken.`
);
}
} else {
await this.sendMessage(roomId, `Anmeldung fehlgeschlagen: ${result.error}`);
}
}
private async handleAnalyze(roomId: string, sender: string, description: string) {
const token = await this.requireLogin(roomId, sender);
if (!token) return;

View file

@ -27,7 +27,6 @@ export const HELP_MESSAGE = `**NutriPhi Bot - KI-Ernahrungsassistent**
**Befehle:**
- \`!help\` - Diese Hilfe anzeigen
- \`!login email passwort\` - Bei NutriPhi anmelden
- \`!analyze beschreibung\` - Text analysieren
- \`!today\` / \`heute\` - Tages-Zusammenfassung
- \`!week\` / \`woche\` - Wochen-Statistik