From bda0d5ad09c557d748f3e5aecbad2b3f108e5cd9 Mon Sep 17 00:00:00 2001 From: Aman Varshney Date: Tue, 18 Mar 2025 13:55:32 +0530 Subject: [PATCH] Remove database check from auth setup flow --- apps/cli/src/helpers/auth-setup.ts | 10 ---------- apps/cli/src/helpers/create-project.ts | 7 +------ 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/apps/cli/src/helpers/auth-setup.ts b/apps/cli/src/helpers/auth-setup.ts index 313d383..69a1a9d 100644 --- a/apps/cli/src/helpers/auth-setup.ts +++ b/apps/cli/src/helpers/auth-setup.ts @@ -8,7 +8,6 @@ import type { ProjectConfig } from "../types"; export async function setupAuth( projectDir: string, enableAuth: boolean, - hasDatabase: boolean, options: ProjectConfig, ): Promise { const serverDir = path.join(projectDir, "packages/server"); @@ -19,15 +18,6 @@ export async function setupAuth( return; } - if (!hasDatabase) { - log.warn( - pc.yellow( - "Authentication enabled but no database selected. Auth will not function properly.", - ), - ); - return; - } - const envPath = path.join(serverDir, ".env"); const templateEnvPath = path.join( PKG_ROOT, diff --git a/apps/cli/src/helpers/create-project.ts b/apps/cli/src/helpers/create-project.ts index 7a15cb7..978f4e9 100644 --- a/apps/cli/src/helpers/create-project.ts +++ b/apps/cli/src/helpers/create-project.ts @@ -70,12 +70,7 @@ export async function createProject(options: ProjectConfig): Promise { options.turso ?? options.database === "sqlite", ); - await setupAuth( - projectDir, - options.auth, - options.database !== "none", - options, - ); + await setupAuth(projectDir, options.auth, options); if (options.git) { await $({ cwd: projectDir })`git init`;