diff --git a/src/main/kotlin/com/hero/alignlab/client/kakao/KakaoOAuthService.kt b/src/main/kotlin/com/hero/alignlab/client/kakao/KakaoOAuthService.kt index 3a844f4..5b2cfbc 100644 --- a/src/main/kotlin/com/hero/alignlab/client/kakao/KakaoOAuthService.kt +++ b/src/main/kotlin/com/hero/alignlab/client/kakao/KakaoOAuthService.kt @@ -28,6 +28,7 @@ class KakaoOAuthService( clientId = config.clientSecretCode, redirectUri = redirectUri ?: config.redirectUrl, code = code, + clientSecret = config.clientSecretCode ) return generateOAuthToken(request) diff --git a/src/main/kotlin/com/hero/alignlab/client/kakao/client/SuspendableKakaoOAuthClient.kt b/src/main/kotlin/com/hero/alignlab/client/kakao/client/SuspendableKakaoOAuthClient.kt index e7ef0fb..850d217 100644 --- a/src/main/kotlin/com/hero/alignlab/client/kakao/client/SuspendableKakaoOAuthClient.kt +++ b/src/main/kotlin/com/hero/alignlab/client/kakao/client/SuspendableKakaoOAuthClient.kt @@ -27,14 +27,13 @@ class SuspendableKakaoOAuthClient( .post() .uri("/token") { builder -> builder - .queryParam("grant_type", "authorization_code") + .queryParam("grant_type", request.grantType) .queryParam("client_id", request.clientId) .queryParam("redirect_uri", request.redirectUri) .queryParam("code", request.code) .queryParam("client_secret", request.clientSecret) .build() } - .bodyValue(request) .request() } }