diff options
| author | joonhoekim <26rote@gmail.com> | 2025-10-16 18:11:48 +0900 |
|---|---|---|
| committer | joonhoekim <26rote@gmail.com> | 2025-10-16 18:11:48 +0900 |
| commit | c49d5a42a66d1d29d477cca2ad56f923313c3961 (patch) | |
| tree | 5d243ae86daf172bd1817283f28d0b58d6c7c540 /lib/users/auth/passwordUtil.ts | |
| parent | 5f29ee456fddfb85d1798094cf3e612f4b7647d8 (diff) | |
(김준회) 파트너 로그인 시, 이메일 화이트리스트 대상은 비밀번호 입력 안하도록 변경
Diffstat (limited to 'lib/users/auth/passwordUtil.ts')
| -rw-r--r-- | lib/users/auth/passwordUtil.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/users/auth/passwordUtil.ts b/lib/users/auth/passwordUtil.ts index 046e7d90..4d5d69f6 100644 --- a/lib/users/auth/passwordUtil.ts +++ b/lib/users/auth/passwordUtil.ts @@ -707,7 +707,7 @@ export async function generateAndSendEmailToken( .where( and( eq(mfaTokens.userId, userId), - eq(mfaTokens.type, 'email'), + eq(mfaTokens.type, 'email_otp'), gte(mfaTokens.createdAt, today) ) ); @@ -723,7 +723,7 @@ export async function generateAndSendEmailToken( .where( and( eq(mfaTokens.userId, userId), - eq(mfaTokens.type, 'email'), + eq(mfaTokens.type, 'email_otp'), eq(mfaTokens.isActive, true) ) ); @@ -737,7 +737,7 @@ export async function generateAndSendEmailToken( await db.insert(mfaTokens).values({ userId, token, - type: 'email', + type: 'email_otp', expiresAt, isActive: true, attempts: 0, @@ -781,7 +781,7 @@ export async function verifyEmailToken( and( eq(mfaTokens.userId, userId), eq(mfaTokens.token, token), - eq(mfaTokens.type, 'email'), + eq(mfaTokens.type, 'email_otp'), eq(mfaTokens.isActive, true) ) ) |
