From f790aa3268be93658d52b789643d068aaa7a9b4a Mon Sep 17 00:00:00 2001 From: ralksta Date: Sat, 7 Mar 2026 09:32:20 +0100 Subject: [PATCH] fix: restore AUTH_SECRET fallback and fix asset caching to resolve fullscreen loading issues --- lib/env.ts | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/lib/env.ts b/lib/env.ts index 026fc60..5ae3f4d 100644 --- a/lib/env.ts +++ b/lib/env.ts @@ -29,25 +29,10 @@ const envSchema = z.object({ /** * Secret used for signing auth cookies and encrypting asset tokens. + * If not provided, IMMICH_API_KEY will be used as a fallback (configured in config.ts). */ AUTH_SECRET: z.string().min(16, 'AUTH_SECRET should be at least 16 characters').optional(), -}).refine( - (data) => { - // Only require AUTH_SECRET in production at runtime, not during build - if ( - process.env.NODE_ENV === 'production' && - !process.env.NEXT_PHASE?.includes('build') && - !data.AUTH_SECRET - ) { - return false; - } - return true; - }, - { - message: 'AUTH_SECRET is required in production', - path: ['AUTH_SECRET'], - }, -); +}); export type Env = z.infer;