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:
@@ -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
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user