feat: remove NEXT_PUBLIC env vars from docker build args (#13)

* feat: add next public envs to runtime

* Commit env vars
This commit is contained in:
Henry
2025-06-03 21:25:57 +01:00
committed by GitHub
parent 37d2ebccf7
commit 0b06f80181
19 changed files with 55 additions and 33 deletions

View File

@@ -3,6 +3,7 @@ import { drizzleAdapter } from "better-auth/adapters/drizzle";
import { createAuthMiddleware } from "better-auth/api";
import { apiKey } from "better-auth/plugins";
import { magicLink } from "better-auth/plugins/magic-link";
import { env } from "next-runtime-env";
import type { dbClient } from "@kan/db/client";
import * as memberRepo from "@kan/db/repository/member.repo";
@@ -70,7 +71,7 @@ export const initAuth = (db: dbClient) => {
const user = ctx.context.session?.user;
if (
process.env.NEXT_PUBLIC_KAN_ENV === "cloud" &&
env("NEXT_PUBLIC_KAN_ENV") === "cloud" &&
user &&
!user.stripeCustomerId
) {