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
이상입니다.
'Backend > 🌿Spring' 카테고리의 다른 글
[JPA] 의존 관계에 있는 연관된 데이터 삭제 처리: Spring과 JPA 및 Query (0) | 2024.01.20 |
---|---|
[SpringBoot/Error] Required URI template variable 'id' for method parameter type int is not present 해결 (0) | 2024.01.19 |
[Spring] 좋은 객체 지향 설계의 5가지 원칙 (SOLID) (2) | 2023.10.11 |
[Spring Boot] application.yml 내용 secret으로 관리하기 (0) | 2023.09.02 |
[SpringBoot] mysql 연동하는 방법 (1) | 2023.05.25 |