fix: use frontend URL for reset/invite links instead of API URL
This commit is contained in:
@@ -95,8 +95,8 @@ export const adminRoutes = new Elysia({ prefix: '/admin' })
|
|||||||
expiresAt,
|
expiresAt,
|
||||||
}).returning();
|
}).returning();
|
||||||
|
|
||||||
const appUrl = process.env.APP_URL || 'https://thenetwork.donovankelly.xyz';
|
const frontendUrl = process.env.FRONTEND_URL || process.env.ALLOWED_ORIGINS?.split(',')[0] || 'https://app.thenetwork.donovankelly.xyz';
|
||||||
const setupUrl = `${appUrl}/invite/${token}`;
|
const setupUrl = `${frontendUrl}/invite/${token}`;
|
||||||
|
|
||||||
return { ...invite, setupUrl };
|
return { ...invite, setupUrl };
|
||||||
}, {
|
}, {
|
||||||
@@ -140,8 +140,8 @@ export const adminRoutes = new Elysia({ prefix: '/admin' })
|
|||||||
expiresAt,
|
expiresAt,
|
||||||
});
|
});
|
||||||
|
|
||||||
const appUrl = process.env.APP_URL || 'https://thenetwork.donovankelly.xyz';
|
const frontendUrl = process.env.FRONTEND_URL || process.env.ALLOWED_ORIGINS?.split(',')[0] || 'https://app.thenetwork.donovankelly.xyz';
|
||||||
const resetUrl = `${appUrl}/reset-password/${token}`;
|
const resetUrl = `${frontendUrl}/reset-password/${token}`;
|
||||||
|
|
||||||
return { resetUrl, email: targetUser.email };
|
return { resetUrl, email: targetUser.email };
|
||||||
}, {
|
}, {
|
||||||
|
|||||||
@@ -36,8 +36,8 @@ export const passwordResetRoutes = new Elysia({ prefix: '/auth/reset-password' }
|
|||||||
expiresAt,
|
expiresAt,
|
||||||
});
|
});
|
||||||
|
|
||||||
const appUrl = process.env.APP_URL || 'https://thenetwork.donovankelly.xyz';
|
const frontendUrl = process.env.FRONTEND_URL || process.env.ALLOWED_ORIGINS?.split(',')[0] || 'https://app.thenetwork.donovankelly.xyz';
|
||||||
const resetUrl = `${appUrl}/reset-password/${token}`;
|
const resetUrl = `${frontendUrl}/reset-password/${token}`;
|
||||||
|
|
||||||
// For now, return the URL in the response (no email sending yet)
|
// For now, return the URL in the response (no email sending yet)
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user