UNPKG

studiocms

Version:

Astro Native CMS for AstroDB. Built from the ground up by the Astro community.

35 lines (34 loc) 965 B
import { z } from "astro/zod"; const localUsernameAndPasswordConfig = z.object({ /** * Allow User Registration - Allows users to register an account * * @default false */ allowUserRegistration: z.boolean().optional().default(true) }).optional().default({}); const authProviderSchema = z.object({ /** * Username and Password Auth Provider * */ usernameAndPassword: z.boolean().optional().default(true), usernameAndPasswordConfig: localUsernameAndPasswordConfig }).optional().default({}); const authConfigSchema = z.object({ /** * Auth Providers - Allows enabling or disabling of the Authentication Providers */ providers: authProviderSchema, /** * Auth Enabled - Allows enabling or disabling of the Authentication Configuration * * @default true */ enabled: z.boolean().optional().default(true) }).optional().default({}); export { authConfigSchema, authProviderSchema, localUsernameAndPasswordConfig };