mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-28 09:12:53 +02:00
🐛 fix(matrix-web): handle Matrix SSO loginToken callback
Add loginWithLoginToken function to exchange Matrix SSO loginToken for credentials. The app layout now detects the loginToken URL parameter and completes the SSO flow. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
9e9db590dc
commit
dc0d425f61
53 changed files with 1550 additions and 230 deletions
|
|
@ -4,9 +4,16 @@ import { CommandRouterService } from './command-router.service';
|
|||
import { HandlersModule } from '../handlers/handlers.module';
|
||||
import { OrchestrationModule } from '../orchestration/orchestration.module';
|
||||
import { VoiceModule } from '../voice/voice.module';
|
||||
import { SessionModule, CreditModule } from '@manacore/bot-services';
|
||||
|
||||
@Module({
|
||||
imports: [forwardRef(() => HandlersModule), forwardRef(() => OrchestrationModule), VoiceModule],
|
||||
imports: [
|
||||
forwardRef(() => HandlersModule),
|
||||
forwardRef(() => OrchestrationModule),
|
||||
VoiceModule,
|
||||
SessionModule.forRoot(),
|
||||
CreditModule.forRoot(),
|
||||
],
|
||||
providers: [MatrixService, CommandRouterService],
|
||||
exports: [MatrixService, CommandRouterService],
|
||||
})
|
||||
|
|
|
|||
|
|
@ -67,6 +67,18 @@ export class CommandRouterService {
|
|||
description: 'Show help',
|
||||
},
|
||||
|
||||
// Auth Commands
|
||||
{
|
||||
patterns: ['!login'],
|
||||
handler: (ctx, args) => this.helpHandler.handleLogin(ctx, args),
|
||||
description: 'Login with email and password',
|
||||
},
|
||||
{
|
||||
patterns: ['!logout'],
|
||||
handler: (ctx) => this.helpHandler.handleLogout(ctx),
|
||||
description: 'Logout',
|
||||
},
|
||||
|
||||
// AI Commands
|
||||
{
|
||||
patterns: ['!models', '!modelle'],
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import { BaseMatrixService, MatrixBotConfig, MatrixRoomEvent } from '@manacore/m
|
|||
import { CommandRouterService, CommandContext } from './command-router.service';
|
||||
import { VoiceService, VoiceServiceError } from '../voice/voice.service';
|
||||
import { VoiceFormatterService } from '../voice/voice-formatter.service';
|
||||
import { SessionService, CreditService } from '@manacore/bot-services';
|
||||
import { HELP_TEXT, WELCOME_TEXT, BOT_INTRODUCTION } from '../config/configuration';
|
||||
|
||||
@Injectable()
|
||||
|
|
@ -16,7 +17,9 @@ export class MatrixService extends BaseMatrixService {
|
|||
private commandRouter: CommandRouterService,
|
||||
@Inject(forwardRef(() => VoiceService))
|
||||
private voiceService: VoiceService,
|
||||
private voiceFormatter: VoiceFormatterService
|
||||
private voiceFormatter: VoiceFormatterService,
|
||||
private sessionService: SessionService,
|
||||
private creditService: CreditService
|
||||
) {
|
||||
super(configService);
|
||||
this.voiceEnabled = configService.get('voice.enabled') !== false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue