File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed
backend/src/main/java/io/f1/backend/domain/user/app/handler Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change 2020@ RequiredArgsConstructor
2121public class OAuthSuccessHandler extends SimpleUrlAuthenticationSuccessHandler {
2222
23- private final ObjectMapper objectMapper ;
24-
2523 @ Override
2624 public void onAuthenticationSuccess (
2725 HttpServletRequest request , HttpServletResponse response , Authentication authentication )
@@ -30,13 +28,9 @@ public void onAuthenticationSuccess(
3028 response .setContentType ("application/json;charset=UTF-8" );
3129
3230 if (principal .getUserNickname () == null ) {
33- // 닉네임 설정 필요 → 202 Accepted
34- response .setStatus (HttpServletResponse .SC_ACCEPTED );
35- objectMapper .writeValue (response .getWriter (), Map .of ("message" , "닉네임을 설정하세요." ));
31+ response .sendRedirect ("/signup" );
3632 } else {
37- // 정상 로그인 → 200 OK
38- response .setStatus (HttpServletResponse .SC_OK );
39- objectMapper .writeValue (response .getWriter (), Map .of ("message" , "로그인 성공" ));
33+ response .sendRedirect ("/room" );
4034 }
4135 }
4236}
You can’t perform that action at this time.
0 commit comments