Skip to content

Commit

Permalink
Merge pull request #14 from 9oormthon-univ/feature/reservation#11
Browse files Browse the repository at this point in the history
fix: 이전 버전으로 수정
  • Loading branch information
BinarySstar authored Nov 23, 2024
2 parents db500d3 + bf1e97b commit 90a2f90
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public ResponseEntity<?> kakaoLogin() {
@ApiResponses(value = {
@ApiResponse(responseCode = "302", description = "메인으로 리다이렉트")
})
@PostMapping("/auth/token")
@PostMapping("/auth/kakao/callback")
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(@RequestBody String code, HttpSession ses

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 90a2f90

Please sign in to comment.