feat: add lemonspaceAppOrigin to trustedOrigins in auth configuration
- Added lemonspaceAppOrigin to the trustedOrigins array, enhancing the security and integration of the authentication process.
This commit is contained in:
@@ -14,6 +14,8 @@ import authConfig from "./auth.config";
|
|||||||
const siteUrl = process.env.SITE_URL!;
|
const siteUrl = process.env.SITE_URL!;
|
||||||
const appUrl = process.env.APP_URL;
|
const appUrl = process.env.APP_URL;
|
||||||
|
|
||||||
|
const lemonspaceAppOrigin = "https://app.lemonspace.io";
|
||||||
|
|
||||||
const polarClient = new Polar({
|
const polarClient = new Polar({
|
||||||
accessToken: process.env.POLAR_ACCESS_TOKEN!,
|
accessToken: process.env.POLAR_ACCESS_TOKEN!,
|
||||||
server: "production",
|
server: "production",
|
||||||
@@ -26,7 +28,7 @@ export const authComponent = createClient<DataModel>(components.betterAuth);
|
|||||||
export const createAuth = (ctx: GenericCtx<DataModel>) => {
|
export const createAuth = (ctx: GenericCtx<DataModel>) => {
|
||||||
return betterAuth({
|
return betterAuth({
|
||||||
baseURL: siteUrl,
|
baseURL: siteUrl,
|
||||||
trustedOrigins: [siteUrl, "http://localhost:3000"],
|
trustedOrigins: [siteUrl, lemonspaceAppOrigin, "http://localhost:3000"],
|
||||||
database: authComponent.adapter(ctx),
|
database: authComponent.adapter(ctx),
|
||||||
emailAndPassword: {
|
emailAndPassword: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user