[FE] feat: 로그인 쿠키 테스트 환경 구축 & 구글 로그인 기능 추가 #159
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR 설명
로그인 쿠키 테스트 환경 구축 & 구글 로그인 기능 추가
✅ 완료한 기능 명세
📸 스크린샷
고민과 해결과정
same-site를 극복하기 위하여...
쿠키의 same-site
우리의 쿠키 설정은 same-site: lax, httpOnly, secure옵션을 사용중이다.
이런 상태에서 개발환경 쿠키테스트를 하기란 쉬운 일이 아니었다.
곰터뷰 팀의 도움을 받아 해결할 수 있었는데,
로컬 -> dev server -> 백엔드 서버
형태로 쿠키를 전달해 dev server(localhost:3000)가 쿠키를 전달하는 형태로 해결했다!
vite의 proxy서버를 활용하여 개발 환경에서 쿠키가 필요한 요청에 대해서 localhost로 요청을 보내주고, 이걸 dev server가 실제 서버로 요청해주어서 쿠키의 same-site속성을 우회해주었다.
그리고 Login Modal에서 handleClick을 배포환경, 서버환경에 따라 분기해주었다.