From 96ba48b5f1caab107815d18eb64eabcdd662f000 Mon Sep 17 00:00:00 2001 From: Matthias Meister Date: Sun, 29 Mar 2026 23:16:30 +0200 Subject: [PATCH] feat: add lemonspaceAppOrigin to trustedOrigins in auth configuration - Added lemonspaceAppOrigin to the trustedOrigins array, enhancing the security and integration of the authentication process. --- convex/auth.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/convex/auth.ts b/convex/auth.ts index 53fcc0b..97f9365 100644 --- a/convex/auth.ts +++ b/convex/auth.ts @@ -14,6 +14,8 @@ import authConfig from "./auth.config"; const siteUrl = process.env.SITE_URL!; const appUrl = process.env.APP_URL; +const lemonspaceAppOrigin = "https://app.lemonspace.io"; + const polarClient = new Polar({ accessToken: process.env.POLAR_ACCESS_TOKEN!, server: "production", @@ -26,7 +28,7 @@ export const authComponent = createClient(components.betterAuth); export const createAuth = (ctx: GenericCtx) => { return betterAuth({ baseURL: siteUrl, - trustedOrigins: [siteUrl, "http://localhost:3000"], + trustedOrigins: [siteUrl, lemonspaceAppOrigin, "http://localhost:3000"], database: authComponent.adapter(ctx), emailAndPassword: { enabled: true,