diff --git a/src/main/java/dynamicquad/agilehub/global/auth/filter/OAuth2SuccessHandler.java b/src/main/java/dynamicquad/agilehub/global/auth/filter/OAuth2SuccessHandler.java index a19943c..da7da72 100644 --- a/src/main/java/dynamicquad/agilehub/global/auth/filter/OAuth2SuccessHandler.java +++ b/src/main/java/dynamicquad/agilehub/global/auth/filter/OAuth2SuccessHandler.java @@ -23,7 +23,7 @@ @Slf4j public class OAuth2SuccessHandler implements AuthenticationSuccessHandler { - private static final String REDIRECT_URL = "/auth/success"; + private static final String REDIRECT_URL = "/"; private static final String CLIENT_DOMAIN = "https://www.agilehub.store"; private final RefreshTokenRedisService redisService; @@ -39,8 +39,8 @@ public void onAuthenticationSuccess(HttpServletRequest request, HttpServletRespo GeneratedToken generatedToken = generateMemberToken(authentication); String redirectUrl = UriComponentsBuilder.fromUriString(REDIRECT_URL) - .queryParam("accessToken", generatedToken.getAccessToken()) - .build().toUriString(); + .queryParam("accessToken", generatedToken.getAccessToken()) + .build().toUriString(); response.sendRedirect(CLIENT_DOMAIN + redirectUrl); } @@ -51,7 +51,7 @@ private GeneratedToken generateMemberToken(Authentication authentication) { String distinctId = principal.getId(); String name = principal.getName(); String role = principal.getAuthorities().stream().findFirst() - .orElseThrow(() -> new GeneralException(ErrorStatus.MEMBER_ROLE_NOT_EXIST)).getAuthority(); + .orElseThrow(() -> new GeneralException(ErrorStatus.MEMBER_ROLE_NOT_EXIST)).getAuthority(); GeneratedToken token = jwtUtil.generateToken(name, role, provider, distinctId);