-
Notifications
You must be signed in to change notification settings - Fork 2
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
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.
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, |
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.
오호 요런 옵션값도 있었군요 배워갑니다~
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.
맞습니당 ! refreshToken
을 넣은 쿠키를 주고받기 위해서는 credential
상태여야 하기 때문에 true
로 설정했습니다.
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.
더욱 깔끔한 코드가 된 것 같네요
수고하셨습니다 🤗
|
||
localStorage.setItem(ACCESS_TOKEN_KEY, data.data.accessToken); | ||
originRequest.data.headers.Authorization = `Bearer ${data.data.accessToken}`; | ||
localStorage.setItem(ACCESS_TOKEN_KEY, data.accessToken); |
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.
data 한번에 받아오는거 보기 좋네요 👍ㅎㅎ
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.
LGTM입니당 고생하셨어요~
해당 이슈 번호
#206
체크리스트