Skip to content

Commit

Permalink
feat: 카카오 로그인 수정
Browse files Browse the repository at this point in the history
resolve: #3
  • Loading branch information
BinarySstar committed Nov 23, 2024
1 parent 15fc914 commit 60705f1
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ public ResponseEntity<?> kakaoLogin() {
@ApiResponses(value = {
@ApiResponse(responseCode = "302", description = "메인으로 리다이렉트")
})
@GetMapping("/auth/kakao/callback")
public ResponseEntity<?> kakaoCallback(@RequestParam String code, HttpSession session) {
@PostMapping("/auth/token")
public ResponseEntity<?> kakaoCallback(@RequestBody String code, HttpSession session) {
KakaoToken accessToken = kakaoAuthService.getAccessToken(code);
log.info("accessToken: {}", accessToken.accessToken());

Expand All @@ -71,8 +71,8 @@ public ResponseEntity<?> kakaoCallback(@RequestParam String code, HttpSession se

session.setAttribute("member", member);
// 메인으로 redirect
return ResponseEntity.status(HttpStatus.FOUND).location(URI.create(frontendDomain)).build();
// return ResponseEntity.ok(session.getAttribute("member"));
// return ResponseEntity.status(HttpStatus.FOUND).location(URI.create(frontendDomain)).build();
return ResponseEntity.ok(session.getAttribute("member"));
}

// 로그아웃
Expand Down

0 comments on commit 60705f1

Please sign in to comment.