Remove database check from auth setup flow

This commit is contained in:
Aman Varshney
2025-03-18 13:55:32 +05:30
parent e77c56909d
commit bda0d5ad09
2 changed files with 1 additions and 16 deletions

View File

@@ -8,7 +8,6 @@ import type { ProjectConfig } from "../types";
export async function setupAuth(
projectDir: string,
enableAuth: boolean,
hasDatabase: boolean,
options: ProjectConfig,
): Promise<void> {
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,

View File

@@ -70,12 +70,7 @@ export async function createProject(options: ProjectConfig): Promise<string> {
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`;