Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
NEWSPRINGISGOOD committed Jan 16, 2024
2 parents 38861ef + 3c93c85 commit 88ef35e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/java/com/umc/StudyFlexBE/service/MemberService.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import jakarta.mail.internet.MimeMessage;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
Expand Down Expand Up @@ -47,7 +48,8 @@ public class MemberService {
private final RestTemplate restTemplate;
private final JavaMailSender javaMailSender;


@Value("${kakao.redirect.url}")
private String KAKAO_REDIRECT_URL;
public boolean checkEmail(String email) {
Member member = memberRepository.findByEmail(email);
if (member == null) {
Expand Down Expand Up @@ -131,7 +133,7 @@ public KaKaoOAuthToken getKakaoToken(String code) {
MultiValueMap<String, String> params = new LinkedMultiValueMap<>();
params.add("grant_type", "authorization_code");
params.add("client_id", "a6e75ba812b0214d4f01fdaec0af6ac1");
params.add("redirect_uri", "http://localhost:8080/app/member/kakao/callback");
params.add("redirect_uri", KAKAO_REDIRECT_URL);
params.add("code", code);
HttpEntity<MultiValueMap<String, String>> kakaoTokenRequest = new HttpEntity<>(params, headers);
ResponseEntity<String> response = restTemplate.exchange(
Expand Down

0 comments on commit 88ef35e

Please sign in to comment.