diff --git a/src/main/java/com/danpoong/onchung/domain/auth/service/AuthService.java b/src/main/java/com/danpoong/onchung/domain/auth/service/AuthService.java index 60cd3de..42fce04 100644 --- a/src/main/java/com/danpoong/onchung/domain/auth/service/AuthService.java +++ b/src/main/java/com/danpoong/onchung/domain/auth/service/AuthService.java @@ -37,6 +37,8 @@ public LoginResponseDto login(HttpServletResponse response, KakaoLoginParam para userInfo.updateRefreshToken(tokenDto.getRefreshToken()); TokenUtil.saveRefreshToken(response, tokenDto.getRefreshToken()); + log.info(params.getAuthorizationCode()); + return LoginResponseDto.builder() .isNewUser(userInfo.getBirthDate() == null) .username(userInfo.getNickname()) diff --git a/src/main/java/com/danpoong/onchung/global/config/SecurityConfig.java b/src/main/java/com/danpoong/onchung/global/config/SecurityConfig.java index ba1d53b..4d04b13 100644 --- a/src/main/java/com/danpoong/onchung/global/config/SecurityConfig.java +++ b/src/main/java/com/danpoong/onchung/global/config/SecurityConfig.java @@ -36,7 +36,11 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception { .authenticationEntryPoint(jwtAuthenticationEntryPoint) .accessDeniedHandler(jwtAccessDeniedHandler); }) - .authorizeHttpRequests((authorizeRequests) -> authorizeRequests.anyRequest().authenticated()) + .authorizeHttpRequests( + authorizeRequests -> authorizeRequests + .requestMatchers("/swagger-ui/**", "/v3/api-docs/**", "/api/auth/**").permitAll() + .anyRequest().authenticated() + ) .addFilterBefore(new JwtAuthorizationFilter(tokenProvider), UsernamePasswordAuthenticationFilter.class) .addFilterBefore(new JwtExceptionFilter(), JwtAuthorizationFilter.class);