Skip to content

Commit 04579b0

Browse files
committed
fix: update invitation email domain configuration
- Changed the domain used in the invitation email link to utilize the NEXT_PUBLIC_BETTER_AUTH_URL environment variable for better flexibility in production environments. - This update ensures that the correct domain is used based on the environment, improving the invitation email functionality.
1 parent 05193c1 commit 04579b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/portal/src/app/lib/auth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export const auth = betterAuth({
2828
async sendInvitationEmail(data) {
2929
const isLocalhost = process.env.NODE_ENV === 'development';
3030
const protocol = isLocalhost ? 'http' : 'https';
31-
const domain = isLocalhost ? 'localhost:3000' : 'app.trycomp.ai';
31+
const domain = isLocalhost ? 'localhost:3000' : process.env.NEXT_PUBLIC_BETTER_AUTH_URL!;
3232
const inviteLink = `${protocol}://${domain}/invite/${data.invitation.id}`;
3333

3434
const url = `${protocol}://${domain}/auth`;

0 commit comments

Comments
 (0)