1. 현재 로그인 코드 분석 및 문제점
현재 구글 소셜 로그인 코드 흐름
프론트에서 구글 로그인 url 요청
http://localhost:8080/oath2/authorization/google
→ 구글 인증 서버 인증 → 구글 리소스 서버 접근 → 유저 정보 저장 및 토큰 생성 → 토큰은 redirect URL에 Query String으로 발급
현재 redirectUrl은 bidmarket.vercel.app/auth?token=~~ 으로 하드코딩 되어있는상태
- 현재 상황에서 토큰을 쿠키에 http only 옵션을 줘서 저장하고 메인페이지로 리다이렉트 시켜주고 싶음
- 우선 현재 코드가 어떻게 작동하는지 파악 할것임
현재 security 코드 분석
WebSecurityConfig
파일
OAuth2AuthenticationSuccessHandler
파일
- 로그인 요청 URL
http://localhost:8080/oauth2/authorization/google
HttpCookieOAuth2AuthorizationRequestRepository 에 걸린 디버그



- authorization_uri = https://accounts.google.com/o/oauth2/v2/auth
- redirect_uri = http://localhost:8080/login/oauth2/code/google
AUTHORIZATION_REQUEST 쿠키 생성
구글 서버에 AUTHORIZATION_CODE를 요청하는 쿠키를 생성
