/* Copyright (C) 2023-2026 QuantumNous This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . For commercial licensing, please contact support@quantumnous.com */ import type { AuthSettings } from '../types' import { createSectionRegistry } from '../utils/section-registry' import { BasicAuthSection } from './basic-auth-section' import { BotProtectionSection } from './bot-protection-section' import { CustomOAuthSection } from './custom-oauth/custom-oauth-section' import { OAuthSection } from './oauth-section' import { PasskeySection } from './passkey-section' const AUTH_SECTIONS = [ { id: 'basic-auth', titleKey: 'Basic Authentication', build: (settings: AuthSettings) => ( ), }, { id: 'oauth', titleKey: 'OAuth Integrations', build: (settings: AuthSettings) => ( ), }, { id: 'passkey', titleKey: 'Passkey Authentication', build: (settings: AuthSettings) => ( ), }, { id: 'bot-protection', titleKey: 'Bot Protection', build: (settings: AuthSettings) => ( ), }, { id: 'custom-oauth', titleKey: 'Custom OAuth', build: () => , }, ] as const export type AuthSectionId = (typeof AUTH_SECTIONS)[number]['id'] const authRegistry = createSectionRegistry({ sections: AUTH_SECTIONS, defaultSection: 'basic-auth', basePath: '/system-settings/auth', urlStyle: 'path', }) export const AUTH_SECTION_IDS = authRegistry.sectionIds export const AUTH_DEFAULT_SECTION = authRegistry.defaultSection export const getAuthSectionNavItems = authRegistry.getSectionNavItems export const getAuthSectionContent = authRegistry.getSectionContent export const getAuthSectionMeta = authRegistry.getSectionMeta