From 18f04bd171537af39ca07cf8f4b15dfc6cb5d579 Mon Sep 17 00:00:00 2001
From: Arachne <66822642+Arachneee@users.noreply.github.com>
Date: Fri, 15 Nov 2024 16:57:38 +0900
Subject: [PATCH] =?UTF-8?q?feat:=20=EB=A1=9C=EA=B7=B8=EC=9D=B8=20=EC=83=9D?=
 =?UTF-8?q?=EC=84=B1=20=ED=9B=84=20=ED=96=89=EC=82=AC=20=EC=83=9D=EC=84=B1?=
 =?UTF-8?q?=20=ED=8E=98=EC=9D=B4=EC=A7=80=EB=A1=9C=20=EB=A6=AC=EB=8B=A4?=
 =?UTF-8?q?=EC=9D=B4=EB=A0=89=ED=8A=B8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../java/server/haengdong/presentation/UserController.java | 7 ++++++-
 server/src/main/resources/application.yml                  | 3 +++
 server/src/main/resources/config                           | 2 +-
 3 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/server/src/main/java/server/haengdong/presentation/UserController.java b/server/src/main/java/server/haengdong/presentation/UserController.java
index d93e784d..a3fad6bd 100644
--- a/server/src/main/java/server/haengdong/presentation/UserController.java
+++ b/server/src/main/java/server/haengdong/presentation/UserController.java
@@ -4,6 +4,7 @@
 import java.net.URI;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.http.HttpHeaders;
 import org.springframework.http.HttpStatus;
@@ -32,6 +33,9 @@ public class UserController {
     private final AuthService authService;
     private final CookieProperties cookieProperties;
 
+    @Value("${login-success.uri}")
+    private String loginSuccessUri;
+
     @PatchMapping("/api/admin/users")
     public ResponseEntity<Void> updateUser(
             @Login Long userId,
@@ -58,8 +62,9 @@ public ResponseEntity<Void> kakaoLogin(@RequestParam String code) {
         String jwtToken = authService.createGuestToken(userId);
 
         ResponseCookie responseCookie = createResponseCookie(jwtToken);
-        return ResponseEntity.ok()
+        return ResponseEntity.status(HttpStatus.MOVED_PERMANENTLY)
                 .header(HttpHeaders.SET_COOKIE, responseCookie.toString())
+                .location(URI.create(loginSuccessUri))
                 .build();
     }
 
diff --git a/server/src/main/resources/application.yml b/server/src/main/resources/application.yml
index 9595a5d5..6298b671 100644
--- a/server/src/main/resources/application.yml
+++ b/server/src/main/resources/application.yml
@@ -77,6 +77,9 @@ kakao:
   client-id: 52f24834ff7304ed2c47294b3f57b053
   oauth-code-uri: https://kauth.kakao.com/oauth/authorize?client_id=%s&redirect_uri=%s&response_type=code&scope=openid
 
+login-success:
+  uri: https://dev.haengdong.pro/event/create
+
 ---
 
 spring:
diff --git a/server/src/main/resources/config b/server/src/main/resources/config
index ae3c392e..6cc0c6a5 160000
--- a/server/src/main/resources/config
+++ b/server/src/main/resources/config
@@ -1 +1 @@
-Subproject commit ae3c392e6b7bc0aa4a2daff1ad3237f81d5f8a79
+Subproject commit 6cc0c6a583932dea92a8e98e86ecf7b5b350d286