summaryrefslogtreecommitdiff
path: root/lib/users/auth/partners-auth.ts
diff options
context:
space:
mode:
Diffstat (limited to 'lib/users/auth/partners-auth.ts')
-rw-r--r--lib/users/auth/partners-auth.ts10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/users/auth/partners-auth.ts b/lib/users/auth/partners-auth.ts
index 5418e2a8..ac0dec08 100644
--- a/lib/users/auth/partners-auth.ts
+++ b/lib/users/auth/partners-auth.ts
@@ -8,7 +8,7 @@ import crypto from 'crypto';
import { PasswordStrength, passwordResetRequestSchema, passwordResetSchema } from './validataions-password';
import { sendEmail } from '@/lib/mail/sendEmail';
import { analyzePasswordStrength, checkPasswordHistory, validatePasswordPolicy } from '@/lib/users/auth/passwordUtil';
-
+import { headers } from 'next/headers';
export interface PasswordValidationResult {
strength: PasswordStrength;
@@ -73,7 +73,13 @@ export async function requestPasswordResetAction(
});
// 재설정 링크 생성
- const resetLink = `${process.env.NEXTAUTH_URL}/auth/reset-password?token=${resetToken}`;
+ const headersList = await headers();
+ const host = headersList.get('host') || 'localhost:3000';
+ // 로그인 또는 서명 페이지 URL 생성
+ // const baseUrl = `http://${host}`
+ const baseUrl = process.env.NEXT_PUBLIC_DMZ_URL || `https://partners.sevcp.com`
+
+ const resetLink = `${baseUrl}/auth/reset-password?token=${resetToken}`;
// 이메일 전송
await sendEmail({