diff options
Diffstat (limited to 'lib/users/verifyOtp.ts')
| -rw-r--r-- | lib/users/verifyOtp.ts | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/lib/users/verifyOtp.ts b/lib/users/verifyOtp.ts index 7b25ed49..694665bf 100644 --- a/lib/users/verifyOtp.ts +++ b/lib/users/verifyOtp.ts @@ -51,31 +51,5 @@ export async function verifyOtpTemp(email: string) { } -export async function verifyExternalCredentials(username: string, password: string) { - // DB에서 email과 code가 맞는지, 만료 안됐는지 검증 - const otpRecord = await findEmailandOtp(username, password) - if (!otpRecord) { - return null - } - - // 만료 체크 - if (otpRecord.otpExpires && otpRecord.otpExpires < new Date()) { - return null - } - - // 여기서 otpRecord에 유저 정보가 있다고 가정 - // 예: otpRecord.userId, otpRecord.userName, otpRecord.email 등 - // 실제 DB 설계에 맞춰 필드명을 조정하세요. - return { - email: otpRecord.email, - name: otpRecord.name, - id: otpRecord.id, - imageUrl: otpRecord.imageUrl, - companyId: otpRecord.companyId, - techCompanyId: otpRecord.techCompanyId, - domain: otpRecord.domain, - } -} - |
