Skip to content
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

[Refactor] Refresh Token 쿠키 관리 로직 + teamId 저장 로직 리팩토링 #207

Merged
merged 14 commits into from
Aug 5, 2024

Conversation

wuzoo
Copy link
Contributor

@wuzoo wuzoo commented Aug 3, 2024

해당 이슈 번호

#206


체크리스트

  • 🔀 PR 제목의 형식을 잘 작성했나요? e.g. [feat] PR을 등록한다.
  • 💯 테스트는 잘 통과했나요?
  • 🏗️ 빌드는 성공했나요?
  • 🧹 불필요한 코드는 제거했나요?
  • ✅ 컨벤션을 지켰나요?
  • 💭 이슈는 등록했나요?
  • 🏷️ 라벨은 등록했나요?
  • 💻 git rebase를 사용했나요?
  • 🙇‍♂️ 리뷰어를 지정했나요?

Copy link
Contributor

@rtttr1 rtttr1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!!!!

@@ -13,6 +13,8 @@ export const axiosInstance = axios.create({

export const axiosPublicInstance = axios.create({
baseURL: `${import.meta.env.VITE_BASE_URL}/api/v1`,
withCredentials: true,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오호 요런 옵션값도 있었군요 배워갑니다~

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

맞습니당 ! refreshToken을 넣은 쿠키를 주고받기 위해서는 credential 상태여야 하기 때문에 true로 설정했습니다.

Copy link
Contributor

@Bowoon1216 Bowoon1216 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

더욱 깔끔한 코드가 된 것 같네요
수고하셨습니다 🤗


localStorage.setItem(ACCESS_TOKEN_KEY, data.data.accessToken);
originRequest.data.headers.Authorization = `Bearer ${data.data.accessToken}`;
localStorage.setItem(ACCESS_TOKEN_KEY, data.accessToken);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

data 한번에 받아오는거 보기 좋네요 👍ㅎㅎ

Copy link
Member

@namdaeun namdaeun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM입니당 고생하셨어요~

@wuzoo wuzoo merged commit 87304c5 into develop Aug 5, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants