Skip to content

Commit

Permalink
[fix] 로그인 redirect 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
eunsu02 committed Dec 29, 2023
1 parent 403999b commit cbcbb1a
Showing 1 changed file with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,23 @@ public ResponseEntity<Void> getGoogleAuthUrl(HttpServletResponse response) throw
.build();
}

// @Operation(summary = "소셜 로그인 성공")
// @GetMapping("/login/oauth2/code/google")
// public ResponseEntity<OAuthResponse> oauthGoogleCheck(@RequestParam(value = "code") String authCode) throws Exception{
// val response = authService.authenticateUser(authCode);
// return ResponseEntity.ok(response);
// }

@Operation(summary = "소셜 로그인 성공")
@GetMapping("/login/oauth2/code/google")
public ResponseEntity<OAuthResponse> oauthGoogleCheck(@RequestParam(value = "code") String authCode) throws Exception{
public ResponseEntity<OAuthResponse> oauthGoogleCheck(@RequestParam(value = "code") String authCode) throws Exception {
val response = authService.authenticateUser(authCode);
return ResponseEntity.ok(response);

String redirectUrl = "http://localhost:3000/auth";

return ResponseEntity.status(HttpStatus.FOUND)
.header("Location", redirectUrl)
.body(response);
}

@Operation(summary = "멤버")
Expand Down

0 comments on commit cbcbb1a

Please sign in to comment.