LINE 로그인 지원 추가
회원 로그인에 LINE 공급자를 추가한다
This commit is contained in:
@@ -369,6 +369,19 @@ class MemberController(
|
||||
return processSocialLogin(MemberProvider.APPLE, token, request, nonce)
|
||||
}
|
||||
|
||||
@PostMapping("/login/line")
|
||||
fun loginLine(
|
||||
@RequestBody request: SocialLoginRequest
|
||||
): ApiResponse<LoginResponse> {
|
||||
val errorKey = socialLoginErrorKey(MemberProvider.LINE)
|
||||
val token = request.identityToken?.takeIf { it.isNotBlank() }
|
||||
?: throw SodaException(messageKey = errorKey)
|
||||
val nonce = request.nonce?.takeIf { it.isNotBlank() }
|
||||
?: throw SodaException(messageKey = errorKey)
|
||||
|
||||
return processSocialLogin(MemberProvider.LINE, token, request, nonce)
|
||||
}
|
||||
|
||||
private fun processSocialLogin(
|
||||
provider: MemberProvider,
|
||||
token: String,
|
||||
@@ -417,6 +430,7 @@ class MemberController(
|
||||
MemberProvider.GOOGLE -> "member.social.google_login_failed"
|
||||
MemberProvider.KAKAO -> "member.social.kakao_login_failed"
|
||||
MemberProvider.APPLE -> "member.social.apple_login_failed"
|
||||
MemberProvider.LINE -> "member.social.line_login_failed"
|
||||
else -> "common.error.bad_request"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user