summaryrefslogtreecommitdiff
path: root/app/api/auth/first-auth
diff options
context:
space:
mode:
Diffstat (limited to 'app/api/auth/first-auth')
-rw-r--r--app/api/auth/first-auth/route.ts8
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) {