Skip to content

Commit

Permalink
chore: fix bug in refresh token
Browse files Browse the repository at this point in the history
  • Loading branch information
sanggae4133 committed Jul 29, 2024
1 parent f0c9dfe commit 0c58a1b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
23 changes: 19 additions & 4 deletions src/main/java/com/on/server/global/config/SecurityConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,28 @@ public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Excepti
http
.csrf(csrf -> csrf.disable())
.authorizeHttpRequests(authorize -> authorize
.requestMatchers("/auth/**", "/login/**", "/v2/api-docs", "/v3/api-docs", "/v3/api-docs/**", "/swagger-resources",
"/swagger-resources/**", "/configuration/ui", "/configuration/security", "/swagger-ui/**",
"/webjars/**", "/swagger-ui.html").permitAll()
.requestMatchers(
"/auth/**",
"/login/**",
"/v2/api-docs",
"/v3/api-docs",
"/v3/api-docs/**",
"/swagger-resources",
"/swagger-resources/**",
"/configuration/ui",
"/configuration/security",
"/swagger-ui/**",
"/webjars/**",
"/swagger-ui.html",
"/login/page",
"/api/1/kakao/refresh",
"/api/v1/kakao/login/oauth2/code/kakao"
)
.permitAll()
.anyRequest().authenticated()
)
.oauth2Login(oauth2 -> oauth2
.loginPage("/login")
.loginPage("/login/page")
.successHandler(successHandler)
.userInfoEndpoint(userInfo -> userInfo
.userService(customOAuth2UserService)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ public ResponseEntity<?> callbackKakao(@RequestParam("token") String token) {

KakaoUserInfoResponseDto kakaoUserInfoResponseDto = kakaoService.getUserInfo(accessToken);

System.out.println("[[[[[user Email]]]]");
System.out.println(kakaoUserInfoResponseDto.getKakaoAccount().getEmail());
System.out.println("[[[[[user Email]]]]");

return new ResponseEntity<>(HttpStatus.OK);
}

Expand Down

0 comments on commit 0c58a1b

Please sign in to comment.