mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-03-12 02:52:36 +01:00
started with Multi-Tenant OpenID.
TODO: working code but needs some refactoring and cleaning up.
This commit is contained in:
parent
d786bf263c
commit
6577144554
10 changed files with 350 additions and 58 deletions
|
|
@ -481,6 +481,7 @@ export type TStartupConfig = {
|
|||
githubLoginEnabled: boolean;
|
||||
googleLoginEnabled: boolean;
|
||||
openidLoginEnabled: boolean;
|
||||
openidMultiTenantEnabled: boolean;
|
||||
appleLoginEnabled: boolean;
|
||||
openidLabel: string;
|
||||
openidImageUrl: string;
|
||||
|
|
@ -558,6 +559,24 @@ export const configSchema = z.object({
|
|||
message: 'At least one `endpoints` field must be provided.',
|
||||
})
|
||||
.optional(),
|
||||
// ===== Add your OpenID configuration =====
|
||||
openid: z
|
||||
.object({
|
||||
tenants: z
|
||||
.array(
|
||||
z.object({
|
||||
name: z.string(),
|
||||
domains: z.string(),
|
||||
openid: z.object({
|
||||
clientId: z.string(),
|
||||
clientSecret: z.string(),
|
||||
issuer: z.string(),
|
||||
}),
|
||||
}),
|
||||
)
|
||||
.optional(),
|
||||
})
|
||||
.optional(),
|
||||
});
|
||||
|
||||
export const getConfigDefaults = () => getSchemaDefaults(configSchema);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue