gristlabs_grist-core/app/server/lib/coreLogins.ts
Spoffy e56b416c7a
Moves core create object and core getLoginSystem to server/lib (#994)
This enables code in ext/ to be able to access it (e.g for proxying / interception).

Additionally adds getCreate() to enable future refactoring of `const create` away from being a global singleton constant.
2024-05-23 23:07:46 +01:00

13 lines
561 B
TypeScript

import { getForwardAuthLoginSystem } from 'app/server/lib/ForwardAuthLogin';
import { GristLoginSystem } from 'app/server/lib/GristServer';
import { getMinimalLoginSystem } from 'app/server/lib/MinimalLogin';
import { getOIDCLoginSystem } from 'app/server/lib/OIDCConfig';
import { getSamlLoginSystem } from 'app/server/lib/SamlConfig';
export async function getCoreLoginSystem(): Promise<GristLoginSystem> {
return await getSamlLoginSystem() ||
await getOIDCLoginSystem() ||
await getForwardAuthLoginSystem() ||
await getMinimalLoginSystem();
}