Skip to content

Commit

Permalink
fix: 401 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
Hoya324 committed Nov 12, 2024
1 parent 618da6a commit 8e3b272
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import org.findy.findy_be.auth.oauth.service.CustomOAuth2UserService;
import org.findy.findy_be.auth.oauth.service.CustomUserDetailsService;
import org.findy.findy_be.auth.oauth.token.AuthTokenProvider;
import org.findy.findy_be.auth.properties.CorsProperties;
import org.findy.findy_be.user.repository.UserRefreshTokenRepository;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
Expand Down Expand Up @@ -45,7 +44,6 @@ public class SecurityConfig {
private static final String API_PREFIX = "/api";
private static final String ADMIN_API_PREFIX = "/api/admin";

private final CorsProperties corsProperties;
private final AppProperties appProperties;
private final AuthTokenProvider tokenProvider;
private final CustomUserDetailsService userDetailsService;
Expand Down Expand Up @@ -86,6 +84,8 @@ public SecurityFilterChain filterChain(HttpSecurity http, HandlerMappingIntrospe
.permitAll()
.requestMatchers(new MvcRequestMatcher(introspector, "/oauth2/authorization/**"))
.permitAll()
.requestMatchers(new MvcRequestMatcher(introspector, "/login/oauth2/code/**"))
.permitAll()
.requestMatchers(new MvcRequestMatcher(introspector, API_PREFIX + "/login"))
.permitAll()
.requestMatchers(new MvcRequestMatcher(introspector, API_PREFIX + "/auth/**"))
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/application-oauth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spring:
redirect-uri: http://localhost:8081/login/oauth2/code/kakao
client-authentication-method: client_secret_post
authorization-grant-type: authorization_code
scope: profile_nickname, profile_image
scope: profile_nickname, profile_image, account_email
client-name: Kakao

provider:
Expand Down Expand Up @@ -50,7 +50,7 @@ jwt:
app:
auth:
tokenSecret: ${TOKEN_SECRET}
tokenExpiry: 1800000
tokenExpiry: 18000000
refreshTokenExpiry: 604800000
oauth2:
authorizedRedirectUris:
Expand Down

0 comments on commit 8e3b272

Please sign in to comment.