diff options
| author | joonhoekim <26rote@gmail.com> | 2025-10-15 21:38:21 +0900 |
|---|---|---|
| committer | joonhoekim <26rote@gmail.com> | 2025-10-15 21:38:21 +0900 |
| commit | a070f833d132e6370311c0bbdad03beb51d595df (patch) | |
| tree | 9184292e4c2631ee0c7a7247f9728fc26de790f1 /app/api/auth/first-auth/route.ts | |
| parent | 280a2628df810dc157357e0e4d2ed8076d020a2c (diff) | |
(김준회) 이메일 화이트리스트 (SMS 우회) 기능 추가 및 기존 로그인 과정 통합
Diffstat (limited to 'app/api/auth/first-auth/route.ts')
| -rw-r--r-- | app/api/auth/first-auth/route.ts | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/app/api/auth/first-auth/route.ts b/app/api/auth/first-auth/route.ts index 6952b472..93daf316 100644 --- a/app/api/auth/first-auth/route.ts +++ b/app/api/auth/first-auth/route.ts @@ -17,6 +17,8 @@ interface FirstAuthResponse { tempAuthKey?: string userId?: number email?: string + mfaType?: 'sms' | 'email' // MFA 타입 추가 + userName?: string // Email OTP 전송 시 필요 otpUsers?: Array<{ id: string name: string @@ -134,12 +136,14 @@ export async function POST(request: NextRequest): Promise<NextResponse<FirstAuth }) } - // 일반 사용자의 경우 기존 응답 + // 일반 사용자의 경우 mfaType 포함하여 응답 return NextResponse.json({ success: true, tempAuthKey: authResult.tempAuthKey, userId: authResult.userId, - email: authResult.email + email: authResult.email, + mfaType: (authResult.mfaType || 'sms') as 'sms' | 'email', // 기본값은 SMS + userName: authResult.userName, }) } catch (error) { |
