-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fe/bugfix/#584 최초 로그인 시 카카오톡 로그인 후 쿠키가 붙지 않음 #585
The head ref may contain hidden characters: "FE/bugfix/#584-\uCD5C\uCD08-\uB85C\uADF8\uC778-\uC2DC-\uCE74\uCE74\uC624\uD1A1-\uB85C\uADF8\uC778-\uD6C4-\uCFE0\uD0A4\uAC00-\uBD99\uC9C0-\uC54A\uC74C"
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💬 오 네트워크 탭에 있었구나!! 백엔드도 lax
수정할게~ 그리고 아래 물음표 코멘트 확인해줘!!
💬 cloudflare 빌드 에러도!!
Deploying with Cloudflare Pages
|
/frontend를 기준으로 빌드하기 때문에 typescript 필요
f9f3607
to
4806d4e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lax 일때는 쿠키도 안붙어버리는구나!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💬 빌드 에러 떴는데 확인해줘!!
🔮 resolved #584
변경 사항
고민과 해결 과정
1️⃣ 원인
로그인을 하는 과정에서 위와 같은 경고 문구가 떴음.
이는 현재 클라이언트에서 서버로 로그인 요청을 보낼 때 서버가 쿠키 설정을 해주게 되는데
지금은 요청의 헤더의
SameSite
속성이 기본 값인Lax
로 설정되어 있기 때문이다.SameSite=Lax
는 보안 상의 이유로 쿠키 전송을 일부 제한하는데, 다른 사이트에서 쿠키 설정을 하려고 하면 차단하게 된다...그래서
localhost
설정에서는 정상적으로 동작했지만,web09-magicconch.pages.dev
와was.magicconch.com
끼리에서는 제대로 동작하지 않았던 것이다.2️⃣ 간단하게 해결
(선택) 테스트 결과
ex) 베이스 브랜치에 포함되기 위한 코드는 모두 정상적으로 동작해야 합니다. 결과물에 대한 스크린샷, GIF, 혹은 라이브 데모가 가능하도록 샘플API를 첨부할 수도 있습니다.
실제 배포 환경에서 제대로 돌아가는 지 확인해봐야 함