From ee430f29ffb90c2381ad8254a4640f6823dff6fe Mon Sep 17 00:00:00 2001 From: bbbang105 <2018111366@dgu.ac.kr> Date: Mon, 30 Sep 2024 04:33:00 +0900 Subject: [PATCH] =?UTF-8?q?#36=20[feat]=20:=20=EC=98=A8=EB=B3=B4=EB=94=A9?= =?UTF-8?q?=20=EC=8B=9C=20=EC=86=8C=EC=85=9C=20=EA=B3=84=EC=A0=95=20?= =?UTF-8?q?=EC=9D=B4=EB=A6=84=EC=9D=84=20=ED=99=95=EC=9D=B8=ED=95=A0=20?= =?UTF-8?q?=EC=88=98=20=EC=9E=88=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../side/onetime/auth/handler/OAuthLoginSuccessHandler.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/side/onetime/auth/handler/OAuthLoginSuccessHandler.java b/src/main/java/side/onetime/auth/handler/OAuthLoginSuccessHandler.java index d1fabc7..698d57b 100644 --- a/src/main/java/side/onetime/auth/handler/OAuthLoginSuccessHandler.java +++ b/src/main/java/side/onetime/auth/handler/OAuthLoginSuccessHandler.java @@ -20,6 +20,8 @@ import side.onetime.util.JwtUtil; import java.io.IOException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; import java.util.Map; @Slf4j @@ -93,7 +95,7 @@ private void handleAuthentication(HttpServletRequest request, HttpServletRespons private void handleNewUser(HttpServletRequest request, HttpServletResponse response, String provider, String providerId, String name) throws IOException { log.info("신규 유저입니다."); String registerToken = jwtUtil.generateRegisterToken(provider, providerId, name, ACCESS_TOKEN_EXPIRATION_TIME); - String redirectUri = String.format(REGISTER_TOKEN_REDIRECT_URI, registerToken); + String redirectUri = String.format(REGISTER_TOKEN_REDIRECT_URI, registerToken, URLEncoder.encode(name, StandardCharsets.UTF_8)); getRedirectStrategy().sendRedirect(request, response, redirectUri); }