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