summaryrefslogtreecommitdiff
path: root/app/api/auth/first-auth
diff options
context:
space:
mode:
authorjoonhoekim <26rote@gmail.com>2025-10-13 18:24:00 +0900
committerjoonhoekim <26rote@gmail.com>2025-10-13 18:24:00 +0900
commit80e3d0befed487e0447bacffd76ed6539f01e992 (patch)
treede5762bea7161e3dd949401b2d985b6723fd32ee /app/api/auth/first-auth
parentff8a168f9fc67b345f4d32065e55f0901ba05b4c (diff)
(김준회) S-GIPS 로그인시 유저 선택해 sms 전송 처리
Diffstat (limited to 'app/api/auth/first-auth')
-rw-r--r--app/api/auth/first-auth/route.ts19
1 files changed, 19 insertions, 0 deletions
diff --git a/app/api/auth/first-auth/route.ts b/app/api/auth/first-auth/route.ts
index e8d86a02..6952b472 100644
--- a/app/api/auth/first-auth/route.ts
+++ b/app/api/auth/first-auth/route.ts
@@ -17,6 +17,16 @@ interface FirstAuthResponse {
tempAuthKey?: string
userId?: number
email?: string
+ otpUsers?: Array<{
+ id: string
+ name: string
+ vndrcd: string
+ phone: string
+ email: string
+ nation_cd: string
+ userId: number
+ vendorInfo?: any
+ }>
error?: string
errorCode?: string
}
@@ -116,6 +126,15 @@ export async function POST(request: NextRequest): Promise<NextResponse<FirstAuth
}
// 1차 인증 성공 응답
+ // S-GIPS의 경우 otpUsers 배열 반환
+ if (provider === 'sgips' && authResult.otpUsers) {
+ return NextResponse.json({
+ success: true,
+ otpUsers: authResult.otpUsers
+ })
+ }
+
+ // 일반 사용자의 경우 기존 응답
return NextResponse.json({
success: true,
tempAuthKey: authResult.tempAuthKey,