아 제 코드는 자동으로 spring security oauth client를 이용해서 필터를 거치면서 토큰요청을 하는거였네요.
로그를 살펴보았는데,
2021-01-29 06:21:30.789 DEBUG 1 --- [nio-8080-exec-9] o.s.security.web.FilterChainProxy : /login/oauth2/code/kakao?code=WUfsXPc1_HRTAGcuV9m-fwoNpS0RlKRf1LyOQhJV0POeLV3_oHjFThsuukeq5C40wZkTQwo9dNoAAAF3TM3JAw&state=zvn9tnsYp59oWQWc5icFomO_ewKng7XAMeY1sSizoHU%3D at position 7 of 15 in additional filter chain; firing Filter: 'OAuth2LoginAuthenticationFilter'
2021-01-29 06:21:30.789 DEBUG 1 --- [nio-8080-exec-9] o.s.s.w.u.matcher.AntPathRequestMatcher : Checking match of request : '/login/oauth2/code/kakao'; against '/login/oauth2/code/*'
2021-01-29 06:21:30.789 DEBUG 1 --- [nio-8080-exec-9] .s.o.c.w.OAuth2LoginAuthenticationFilter : Request is to process authentication
2021-01-29 06:21:30.793 DEBUG 1 --- [nio-8080-exec-9] .s.o.c.w.OAuth2LoginAuthenticationFilter : Authentication request failed: org.springframework.security.oauth2.core.OAuth2AuthenticationException: [authorization_request_not_found]
org.springframework.security.oauth2.core.OAuth2AuthenticationException: [authorization_request_not_found]
at org.springframework.security.oauth2.client.web.OAuth2LoginAuthenticationFilter.attemptAuthentication(OAuth2LoginAuthenticationFilter.java:163) ~[spring-security-oauth2-client-5.3.5.RELEASE.jar!/:5.3.5.RELEASE]
at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:212) ~[spring-security-web-5.3.5.RELEASE.jar!/:5.3.5.RELEASE]
위처럼 authorization_request_not_found 가 뜨더라구요.
로컬에서는 저 에러가 뜨지 않고 토큰 발급 요청으로 넘어가는데 배포된 서버에서는 저에러가 뜨면서 토큰 요청 없이 종료되버려요 ㅜㅜ
서버에 배포할때 jenkins랑 docker를 이용해서 blue-A, bule-B 이런식으로 배포하였는데 이게 원인이 될수 있는건가요?