Backend/🌿Spring
[SpringBoot/Error] version 3.0 OAuth2.0 카카오 로그인 오류
발달중인 망고
2023. 5. 24. 13:44
Login with OAuth 2.0
[invalid_token_response] An error occurred while attempting to retrieve the OAuth 2.0 Access Token Response: 401 Unauthorized: [no body]
SpringBoot 3.0.7 버전을 사용하던 중 OAuth2.0 소셜 로그인 중 일어났던 오류입니다.
아래와 같은 오류는 Spring Boot가 2.x.x 버전에서 3.x.x버전으로 올라감에 따라 일어남으로 인지했습니다.
Kakao 소셜 로그인중 일어났으며 해결방법은 아래와 같습니다.
client-authentication-method: Post
먼저 스프링 시큐리티 버전을 확인하신 뒤, 변경하시면 됩니다.
# Spring security 5.6 이후라면
(POST → client_secret_post) 변경하시면 됩니다.
client-authentication-method: client_secret_post
이상입니다.