mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 20:21:09 +02:00
feat(matrix-bots): enable cross-bot SSO via Redis sessions
All 19 Matrix bots now use SessionModule.forRoot({ storageMode: 'redis' })
to share user sessions across all bots via Redis. Users only need to
login once with any bot to be authenticated with all bots.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
0cafd4f94f
commit
b6925e0b63
17 changed files with 33 additions and 17 deletions
|
|
@ -6,7 +6,7 @@ import { SessionModule, TranscriptionModule, CreditModule } from '@manacore/bot-
|
|||
@Module({
|
||||
imports: [
|
||||
ChatModule,
|
||||
SessionModule.forRoot(),
|
||||
SessionModule.forRoot({ storageMode: 'redis' }),
|
||||
TranscriptionModule.register({
|
||||
sttUrl: process.env.STT_URL || 'http://localhost:3020',
|
||||
}),
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import {
|
|||
imports: [
|
||||
ClockModule,
|
||||
TranscriptionModule.forRoot(),
|
||||
SessionModule.forRoot(),
|
||||
SessionModule.forRoot({ storageMode: 'redis' }),
|
||||
CreditModule.forRoot(),
|
||||
I18nModule.forRoot(),
|
||||
],
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import {
|
|||
@Module({
|
||||
imports: [
|
||||
ContactsModule,
|
||||
SessionModule.forRoot(),
|
||||
SessionModule.forRoot({ storageMode: 'redis' }),
|
||||
TranscriptionModule.register({
|
||||
sttUrl: process.env.STT_URL || 'http://localhost:3020',
|
||||
}),
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import { SessionModule, CreditModule } from '@manacore/bot-services';
|
|||
forwardRef(() => HandlersModule),
|
||||
forwardRef(() => OrchestrationModule),
|
||||
VoiceModule,
|
||||
SessionModule.forRoot(),
|
||||
SessionModule.forRoot({ storageMode: 'redis' }),
|
||||
CreditModule.forRoot(),
|
||||
],
|
||||
providers: [MatrixService, CommandRouterService],
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import { SessionModule, TranscriptionModule, CreditModule } from '@manacore/bot-
|
|||
@Module({
|
||||
imports: [
|
||||
ManadeckModule,
|
||||
SessionModule.forRoot(),
|
||||
SessionModule.forRoot({ storageMode: 'redis' }),
|
||||
TranscriptionModule.register({
|
||||
sttUrl: process.env.STT_URL || 'http://localhost:3020',
|
||||
}),
|
||||
|
|
|
|||
|
|
@ -4,7 +4,12 @@ import { NutriPhiModule } from '../nutriphi/nutriphi.module';
|
|||
import { SessionModule, TranscriptionModule, CreditModule } from '@manacore/bot-services';
|
||||
|
||||
@Module({
|
||||
imports: [NutriPhiModule, SessionModule.forRoot(), TranscriptionModule.forRoot(), CreditModule.forRoot()],
|
||||
imports: [
|
||||
NutriPhiModule,
|
||||
SessionModule.forRoot({ storageMode: 'redis' }),
|
||||
TranscriptionModule.forRoot(),
|
||||
CreditModule.forRoot(),
|
||||
],
|
||||
providers: [MatrixService],
|
||||
exports: [MatrixService],
|
||||
})
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import { TranscriptionModule, SessionModule, CreditModule } from '@manacore/bot-
|
|||
TranscriptionModule.register({
|
||||
sttUrl: process.env.STT_URL || 'http://localhost:3020',
|
||||
}),
|
||||
SessionModule.forRoot(),
|
||||
SessionModule.forRoot({ storageMode: 'redis' }),
|
||||
CreditModule.forRoot(),
|
||||
],
|
||||
providers: [MatrixService],
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import { SessionModule, TranscriptionModule, CreditModule } from '@manacore/bot-
|
|||
@Module({
|
||||
imports: [
|
||||
PictureModule,
|
||||
SessionModule.forRoot(),
|
||||
SessionModule.forRoot({ storageMode: 'redis' }),
|
||||
TranscriptionModule.register({
|
||||
sttUrl: process.env.STT_URL || 'http://localhost:3020',
|
||||
}),
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import { SessionModule, TranscriptionModule, CreditModule } from '@manacore/bot-
|
|||
@Module({
|
||||
imports: [
|
||||
PlantaModule,
|
||||
SessionModule.forRoot(),
|
||||
SessionModule.forRoot({ storageMode: 'redis' }),
|
||||
TranscriptionModule.register({
|
||||
sttUrl: process.env.STT_URL || 'http://localhost:3020',
|
||||
}),
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import { SessionModule, TranscriptionModule, CreditModule } from '@manacore/bot-
|
|||
@Module({
|
||||
imports: [
|
||||
PresiModule,
|
||||
SessionModule.forRoot(),
|
||||
SessionModule.forRoot({ storageMode: 'redis' }),
|
||||
TranscriptionModule.register({
|
||||
sttUrl: process.env.STT_URL || 'http://localhost:3020',
|
||||
}),
|
||||
|
|
|
|||
|
|
@ -6,7 +6,13 @@ import { GenerationModule } from '../generation/generation.module';
|
|||
import { SessionModule, CreditModule } from '@manacore/bot-services';
|
||||
|
||||
@Module({
|
||||
imports: [ProjectModule, MediaModule, GenerationModule, SessionModule.forRoot(), CreditModule.forRoot()],
|
||||
imports: [
|
||||
ProjectModule,
|
||||
MediaModule,
|
||||
GenerationModule,
|
||||
SessionModule.forRoot({ storageMode: 'redis' }),
|
||||
CreditModule.forRoot(),
|
||||
],
|
||||
providers: [MatrixService],
|
||||
exports: [MatrixService],
|
||||
})
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import { SessionModule, TranscriptionModule, CreditModule } from '@manacore/bot-
|
|||
@Module({
|
||||
imports: [
|
||||
QuestionsModule,
|
||||
SessionModule.forRoot(),
|
||||
SessionModule.forRoot({ storageMode: 'redis' }),
|
||||
TranscriptionModule.register({
|
||||
sttUrl: process.env.STT_URL || 'http://localhost:3020',
|
||||
}),
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import { SessionModule, TranscriptionModule, CreditModule } from '@manacore/bot-
|
|||
@Module({
|
||||
imports: [
|
||||
SkilltreeModule,
|
||||
SessionModule.forRoot(),
|
||||
SessionModule.forRoot({ storageMode: 'redis' }),
|
||||
TranscriptionModule.register({
|
||||
sttUrl: process.env.STT_URL || 'http://localhost:3020',
|
||||
}),
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import { TranscriptionModule, SessionModule, CreditModule } from '@manacore/bot-
|
|||
TranscriptionModule.register({
|
||||
sttUrl: process.env.STT_URL || 'http://localhost:3020',
|
||||
}),
|
||||
SessionModule.forRoot(),
|
||||
SessionModule.forRoot({ storageMode: 'redis' }),
|
||||
CreditModule.forRoot(),
|
||||
],
|
||||
providers: [MatrixService],
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import { SessionModule, TranscriptionModule, CreditModule } from '@manacore/bot-
|
|||
@Module({
|
||||
imports: [
|
||||
StorageModule,
|
||||
SessionModule.forRoot(),
|
||||
SessionModule.forRoot({ storageMode: 'redis' }),
|
||||
TranscriptionModule.register({
|
||||
sttUrl: process.env.STT_URL || 'http://localhost:3020',
|
||||
}),
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import { TranscriptionModule, SessionModule, CreditModule } from '@manacore/bot-
|
|||
TranscriptionModule.register({
|
||||
sttUrl: process.env.STT_URL || 'http://localhost:3020',
|
||||
}),
|
||||
SessionModule.forRoot(),
|
||||
SessionModule.forRoot({ storageMode: 'redis' }),
|
||||
CreditModule.forRoot(),
|
||||
],
|
||||
providers: [MatrixService],
|
||||
|
|
|
|||
|
|
@ -4,7 +4,12 @@ import { QuotesModule } from '../quotes/quotes.module';
|
|||
import { SessionModule, TranscriptionModule, CreditModule } from '@manacore/bot-services';
|
||||
|
||||
@Module({
|
||||
imports: [QuotesModule, SessionModule.forRoot(), TranscriptionModule.forRoot(), CreditModule.forRoot()],
|
||||
imports: [
|
||||
QuotesModule,
|
||||
SessionModule.forRoot({ storageMode: 'redis' }),
|
||||
TranscriptionModule.forRoot(),
|
||||
CreditModule.forRoot(),
|
||||
],
|
||||
providers: [MatrixService],
|
||||
exports: [MatrixService],
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue