From 23e640ae811ce348ae1b4fb8e5d74f4624a7cc4c Mon Sep 17 00:00:00 2001 From: hyunkyu Date: Wed, 2 Aug 2023 15:07:52 +0900 Subject: [PATCH] =?UTF-8?q?[fix]=20GGBE-212=20=EC=98=88=EC=83=81=EC=B9=98?= =?UTF-8?q?=EB=AA=BB=ED=95=9C=20=EC=97=90=EB=9F=AC=EC=8B=9C=20front=20url?= =?UTF-8?q?=EB=A1=9C=20redir,=20=EB=B0=B1=EC=97=94=EB=93=9C=20=EC=97=90?= =?UTF-8?q?=EB=9F=AC=ED=8E=98=EC=9D=B4=EC=A7=80=20=EC=95=88=EB=9C=A8?= =?UTF-8?q?=EB=8F=84=EB=A1=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../handler/OAuthAuthenticationSuccessHandler.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/gg/server/global/security/handler/OAuthAuthenticationSuccessHandler.java b/src/main/java/com/gg/server/global/security/handler/OAuthAuthenticationSuccessHandler.java index 0f0e6c394..37f63ca4d 100644 --- a/src/main/java/com/gg/server/global/security/handler/OAuthAuthenticationSuccessHandler.java +++ b/src/main/java/com/gg/server/global/security/handler/OAuthAuthenticationSuccessHandler.java @@ -38,7 +38,12 @@ public class OAuthAuthenticationSuccessHandler extends SimpleUrlAuthenticationSu @Override public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication) throws IOException { - String targetUrl = determineTargetUrl(request, response, authentication); + String targetUrl; + try{ + targetUrl = determineTargetUrl(request, response, authentication); + } catch (Exception e) { + targetUrl = applicationYmlRead.getFrontUrl(); + } if (response.isCommitted()) { logger.debug("Response has already been committed. Unable to redirect to " + targetUrl);