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

feat: refresh token 적용 #447

Merged
merged 30 commits into from
Oct 2, 2023
Merged

feat: refresh token 적용 #447

merged 30 commits into from
Oct 2, 2023

Conversation

iamjooon2
Copy link
Collaborator

@iamjooon2 iamjooon2 commented Sep 26, 2023

📄 Summary

#384

주요 변경사항

  • refresh token 적용

    • 리프레시 토큰 전달 방식은 브라우저 쿠키...! -> 모바일이 아닌 웹 환경을 최대한 살리고 싶었습니다
  • 로그아웃 API 구현

  • 기존 비관리 의존성 때문에 모킹하던 부분 통합테스트 추가

🙋🏻 More

대략적인 플로우는 다음과 같습니다...!

image

@iamjooon2 iamjooon2 added this to the 6차 데모데이 milestone Sep 26, 2023
@iamjooon2 iamjooon2 self-assigned this Sep 26, 2023
@iamjooon2 iamjooon2 linked an issue Sep 26, 2023 that may be closed by this pull request
1 task
@iamjooon2 iamjooon2 marked this pull request as draft September 27, 2023 08:24
@iamjooon2 iamjooon2 marked this pull request as ready for review September 27, 2023 10:10
Copy link
Collaborator

@wonyongChoi05 wonyongChoi05 left a comment

Choose a reason for hiding this comment

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

오우오우 갈비 너무 수고했어~~ 코드가 너무 깔끔해서 별로 남길 게 없넹ㅋㅋ 저번에 라이브로 했던 피드백 기억 안날까봐 조금 달아놨어 추석 잘 쉬고 오시게~ 풍가위(풍성한 한가위) 보내~~

return TokenDto.of(accessToken, refreshToken);
}

public String renewAccessToken(String token) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

리뷰 반영 감사합니다 👍🏻👍🏻

return TokenDto.of(accessToken, refreshToken);
}

public String renewAccessToken(String token) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

이 토큰이 액세스 토큰인지, 리프레시 토큰인지 변수명으로 잘 설명이 되었으면 좋겠어요

public String renewAccessToken(String token) {
jwtProvider.validateParseJws(token);

RefreshToken savedRefreshToken = refreshTokenRepository.getByToken(token);
Copy link
Collaborator

Choose a reason for hiding this comment

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

saved라는 상태를 나타내는 형용사가 필요할까요?

Copy link
Collaborator Author

@iamjooon2 iamjooon2 Sep 28, 2023

Choose a reason for hiding this comment

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

파라미터로 받는 토큰 변수명이 refreshToken이 된다면 필요할 예정

RefreshToken savedRefreshToken = refreshTokenRepository.getByToken(token);
Long memberId = savedRefreshToken.getMemberId();

return jwtProvider.createAccessToken(memberId.toString());
Copy link
Collaborator

@wonyongChoi05 wonyongChoi05 Sep 28, 2023

Choose a reason for hiding this comment

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

이거 가비랑 이전에 이야기 나눴던 부분인데

  1. jwtProvider.createAccessToken 메서드를 사용하는 쪽에서 문자열로 변경해서 주자
  2. 기존 타입(예를들면 memberId는 Long이죠?)을 받고 jwtProvider.createAccessToken 메서드가 문자열로 변경하기

1번 2번 중에서 책임과 역할에 맞는건 뭘까요? 롤로노아 로지와 갈비의 민무의 아는 형님의 무민의 생각이 궁금합니다

Copy link
Collaborator

Choose a reason for hiding this comment

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

저라면 2요
회원아이디를 애플리케이션 전역에서 Long으로 다루고 있기 때문 인데요

제 의견이 다소 공감이 어려울 수 있을 것 같아 예를 들자면
만약 타입이 따로 있었다면 다음과 같이 있는게
String으로 변환한 인자를 넣는 것보다 사용성이 좋을 것이 분명하기 때문입니다.
책임과 역할도 분명히 이 메서드의 것이고요.

public String createAccessToken(MemberId memberId) 

지금은 MemberId라는 타입입 없으니 Long을 사용하는 것이 맞겠지만요..

Copy link
Member

Choose a reason for hiding this comment

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

1, 2 관점에서 고민해봤는데 1로 하게 되어 String으로 오게되면 만약 정책이 바뀌어도 잘못 사용할 가능성이 있어보이네요.

예를 들어, memberId를 payload로 사용하다가 accessToken payload를 email로 바꾸게 되면 밖에서 넘어오는 값을 모두 email로 바꿔줘야 됩니다. 근데 실수로 하나라도 놓치게 되면, String으로 받고 있는 경우에는 코드 상에서는 드러나지 않아 나중에 운영시점에 버그로 발견될 것 같습니당. 하지만, 만약 안에서 바꾸게 되면 모든 부분에서 컴파일 에러가 발생해서 방지할 수 있을 것 같아요.

그래서 저두 2번이 좀 더 좋아보이네여

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

2번으로 바꾸어서 올렸슴니다

public class RefreshToken {

@Id
@Include
Copy link
Collaborator

Choose a reason for hiding this comment

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

EqualsAndHashCode 어노테이션이 존재하지 않아도 동작하는 어노테이션인가요?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

image

이 친구 찾는 거 맞나요?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

조금 더 구체적으로 남겨주셨으면 좋겠어요ㅠ 어떤 의미인지 파악하기 어렵네요

Copy link
Collaborator

Choose a reason for hiding this comment

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

그러게 베베야 맵다 매워

Copy link
Collaborator

Choose a reason for hiding this comment

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

ㅠㅠ Include 말한거에요...

Comment on lines 8 to 10
return new AccessTokenResponse(
accessToken
);
Copy link
Collaborator

Choose a reason for hiding this comment

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

한 줄로 쓰는거 어떤가요?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ditto

Comment on lines 9 to 12
return new TokenDto(
accessToken,
refreshToken
);
Copy link
Collaborator

Choose a reason for hiding this comment

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

ditto 줄이 그렇게 길지 않을 때는 한 줄로 쓰는게 더 깔끔해 보이더라구요!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

저는 개행이 있는게 오히려 깔끔하더라구요
new 키워드 바로 밑에 들어갈 파라미터들이 눈에 확 들어오는 느낌

우리 컨벤션으로 정한게 없으니까 이야기 같이 나눠보죠

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

코드 보니까 셋 다 한줄로 쓰고 저만 이렇게 쓰네요ㅋㅋ

바꿔서 올릴게요~

Date now = new Date();
Date validity = new Date(now.getTime() + validityInMilliseconds);
Date expiration = new Date(now.getTime() + expireLength);
Copy link
Collaborator

Choose a reason for hiding this comment

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

변수명 직관적이고 좋네요 👍🏻

private final long expireLength;

public RefreshTokenCookieProvider(JwtCredentials jwtCredentials) {
this.expireLength = jwtCredentials.getRefreshTokenExpireLength();
Copy link
Collaborator

Choose a reason for hiding this comment

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

요거 @value 빈으로 바로 바인딩 안되나여?

kyY00n
kyY00n previously approved these changes Sep 30, 2023
Copy link
Collaborator

@kyY00n kyY00n left a comment

Choose a reason for hiding this comment

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

궁금한 거 코멘트 남겼어요! 수고했어 가비 :D

@Entity
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@EqualsAndHashCode(onlyExplicitlyIncluded = true, callSuper = false)
public class RefreshToken extends BaseTimeEntity {
Copy link
Collaborator

Choose a reason for hiding this comment

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

이건 모두의 이해를 위한 질문!
리프레시토큰을 기존 테이블의 컬럼으로 추가하지 않고 분리한 이유는 무엇인가요? 😃

Copy link
Collaborator Author

@iamjooon2 iamjooon2 Sep 30, 2023

Choose a reason for hiding this comment

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

기존 테이블의 칼럼으로 들어가면 레디스 등의 토큰 전용 DB 적용하여 따로 뺴는 상황에
버려지는 칼럼이 하나 생기는 셈일 것 같습니다

Copy link
Collaborator

Choose a reason for hiding this comment

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

좋습니다 👍🏻

}

public ResponseCookie createLogoutCookie() {
return ResponseCookie.from(REFRESH_TOKEN, LOGOUT_COOKIE_VALUE)
Copy link
Collaborator

Choose a reason for hiding this comment

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

로그아웃을 이렇게 구현하셨군요 가비👍🏻
로그아웃 쿠키를 아예 없애는 방법도 있었을 것 같은데, 이렇게 한 이유가 궁금합니다!
(단순 질문)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

null이 아닌 공백 문자열을 사용한 이유가 맞나요...?

자바시작하고 null이란친구가 많이 괴롭혀서 되도록이면 null 대신 공백문자열 쓰는 편입니다

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

아 서버에서 아예 지우는 건.... 레퍼런스 찾아봐도 위에 언급한 null밖에 없드라구요

Copy link
Collaborator

Choose a reason for hiding this comment

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

좋습니다! 참고한 레퍼런스를 PR에 추가해주시면 더 좋을 것 같습니다 👍🏻

Copy link
Collaborator Author

@iamjooon2 iamjooon2 Oct 2, 2023

Choose a reason for hiding this comment

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

추가해뒀습니다

스프링 시큐리티 보고 생각해보니 null을 넣어주는게 쿠키 지우는 방법인가 싶은데
변경하면 어푸르브 깨질테니 냅둘게요

@Test
void 토큰으로_찾을_수_있다() {
// given
refreshTokenRepository.save(new RefreshToken(1L, "집고의 비밀 토큰"));
Copy link
Collaborator

Choose a reason for hiding this comment

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

개귀엽다 ㅋㅋㅋㅋ

. · *
˚ .
:¨·.·¨:
`·. 집고의 비밀 토큰-★°*゚

@@ -21,7 +21,8 @@ spring:
enabled: true
jwt:
secret-key: this1-is2-zipgo3-test4-secret5-key6
expire-length: 604800000
access-token-expire-length: 604800000
refresh-token-expire-length: 9999999999999
Copy link
Collaborator

Choose a reason for hiding this comment

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

이거는 어떤 뜻일까용? 무한대??

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

테스트용이라 별 의미 없습니다

Copy link
Collaborator Author

@iamjooon2 iamjooon2 Oct 1, 2023

Choose a reason for hiding this comment

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

실제 토큰 만료기한은 엑세스토큰 - 30분
리프레시토큰 - 일주일

로 생각중입니다

같이 얘기나누어봐요

Copy link
Collaborator

Choose a reason for hiding this comment

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

맞네요 테스트!! 패키지를 잘못 봤어요 ㅎㅎ

Copy link
Member

@parkmuhyeun parkmuhyeun left a comment

Choose a reason for hiding this comment

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

고생했으 갈비~ 👍🏻👍🏻

refreshToken DB에 저장하는거 같은데 쌓인거 삭제 관련된 내용은 없는거 같아서 어떻게 할 생각인지 궁금합니당

RefreshToken savedRefreshToken = refreshTokenRepository.getByToken(token);
Long memberId = savedRefreshToken.getMemberId();

return jwtProvider.createAccessToken(memberId.toString());
Copy link
Member

Choose a reason for hiding this comment

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

1, 2 관점에서 고민해봤는데 1로 하게 되어 String으로 오게되면 만약 정책이 바뀌어도 잘못 사용할 가능성이 있어보이네요.

예를 들어, memberId를 payload로 사용하다가 accessToken payload를 email로 바꾸게 되면 밖에서 넘어오는 값을 모두 email로 바꿔줘야 됩니다. 근데 실수로 하나라도 놓치게 되면, String으로 받고 있는 경우에는 코드 상에서는 드러나지 않아 나중에 운영시점에 버그로 발견될 것 같습니당. 하지만, 만약 안에서 바꾸게 되면 모든 부분에서 컴파일 에러가 발생해서 방지할 수 있을 것 같아요.

그래서 저두 2번이 좀 더 좋아보이네여

return ResponseEntity.ok(AccessTokenResponse.from(accessToken));
}

@PostMapping("/log-out")
Copy link
Member

Choose a reason for hiding this comment

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

위에서 로그인도 "/login"인데
"/logout"으로 해도 될 것 같아여

}

@PostMapping("/log-out")
public ResponseEntity<Void> logOut(@Auth AuthCredentials authCredentials) {
Copy link
Member

Choose a reason for hiding this comment

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

메서드 이름도!

Comment on lines 13 to 14
private final long accessTokenExpireLength;
private final long refreshTokenExpireLength;
Copy link
Member

Choose a reason for hiding this comment

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

length가 뭔가 길이라고 해석되는거 같아서 다음 중에 어떤가요!?
"expiryPeriod"
"expiryTerm"
"expiryTime"

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

꼼꼼 굳

@SpringBootTest
@SuppressWarnings("NonAsciiCharacters")
@DisplayNameGeneration(DisplayNameGenerator.ReplaceUnderscores.class)
class AuthServiceMockTest {
Copy link
Member

Choose a reason for hiding this comment

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

얘 컨테이너 띄울 필요가 없지 않나여
@SpringBootTest 제거하고 @ExtendWith(MockitoExtension.class)으로 대체 후

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@parkmuhyeun 남길 곳이 없어서 여기 남겨요

만료된 토큰 지우는 건, 리프레시토큰까지 만료되서 재로그인 하는 과정에서 해당 회원의 memberId를 가진 토큰을 지우도록 추가했어요
요 부분이에요

Copy link
Member

Choose a reason for hiding this comment

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

재 로그인 할 때 지우는군여

parkmuhyeun
parkmuhyeun previously approved these changes Oct 2, 2023
Copy link
Collaborator

@kyY00n kyY00n left a comment

Choose a reason for hiding this comment

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

수고하셨습니당 ☀️

@iamjooon2 iamjooon2 merged commit dc5781f into develop Oct 2, 2023
1 check passed
@iamjooon2 iamjooon2 deleted the feat/#384 branch October 2, 2023 14:47
HyeryongChoi added a commit that referenced this pull request Oct 19, 2023
* feat: 식품 필터링 결과 없을 때 텍스트 추가 (#431)

* feat: 식품 필터링 결과 없을 때 텍스트 추가

* refactor: 필터링 결과 없을 때 텍스트 문구 수정

* refactor: Toast 사용 방법 리팩터링 / 강아지 터치 이스터에그 수정 (#428)

* refactor: Toast 로직 Context with Provider로 변경

* refactor: 강아지 이스터에그 수정

* refactor: ToastContext 타입 분리 및 리팩터링

* refactor: Landing Toast 사용 방법 변경

* fix: 이스터에그 오탈자 수정(꺠 -> 깨) (#443)

* feat: 리뷰 요약 조회 json 프로퍼티 명 수정 (#449)

* fix: json 프로퍼티명 수정

* fix: 리뷰 요약 조회 API 문서 수정

* chore: 사용하지 않는 의존성 제거

* chore: 사용하지 않는 DTO 제거

* feat: 쿼리 카운터 적용 (#445)

* feat: 쿼리 카운터 객체 생성

* feat: 커넥션 다이나믹 프록시 구현을 위한 handler 추가

* feat: 쿼리카운터 AOP 적용

* feat: 쿼리카운터 로깅 인터셉터 추가

* test: 공통 MockMvcTest 추가

* feat: refresh token 적용 (#447)

* feat: refresh token 설정값 추가

* feat: refresh token 생성 기능 추가

* feat: refresh token을 쿠키에 담아 담는 기능

* refactor: String.valueOf() 대신 .toString()을 사용하도록 변경

* refactor: refreshTokenCookieProvider 객체 도출

* refactor: tokenRefresh 기능 구현

* refactor: ResponseCookie 적용

* test: authServiceTest 작성

* test: jwtProviderTest 작성

* test: refreshTokenRepositoryTest 작성

* chore: application-local1.yml 삭제

* feat: 로그아웃 기능 구현

* test: 토큰 인증 실패시 401 예외 추가

* refactor: DTO 네이밍 헷갈리지 않도록 수정

* test: 로그아웃 쿠키 테스트 추가

* test: 로그아웃 쿠키 테스트 수정

* feat: API 명세 변경 `/logout` -> `/log-out`

* refactor: Tokens -> TokenDto 네이밍 변경

* feat: token rotation 제거

* refactor: AuthServiceTest 내 모킹테스트 분리

* refactor: Controller 테스트 분리

* feat: refreshToken BaseTimeEntity 적용

* refactor: renewAccessToken -> renewAccessTokenBy 메서드명 변경 및 파라미터 이름 token -> refreshToken 변경

* refactor: 테스트용 시크릿 키 상수 분리

* refactor: 개행 변경

* refactor: logout 통일

* refactor: 토큰 만료기한 변수명 수정

* test: 불필요한 @SpringBootTest 제거

* refactor: 토큰 생성시 받는 파라미터 타입 변경

* feature: 에러 핸들링 고도화 (#453)

* feat: webpack config 자동 완성 annotation 추가

* feat: ErrorBoundary onError 옵션 추가

* feat: RenderProps 타입 추가

* feat: ErrorBoundary ignore option 추가

* feat: APIBoundary 추가

* feat: componseFunctions util 함수 추가

* feat: useErrorBoundary 추가

* feat: PrefetchImg 추가

* refactor: Global Provider들의 사용 위치를 index > App으로 변경

* feat: Global eventHandler 추가

- online
- offline
- unhandledrejection

* feat: QueryBoundary 추가 및 디렉토리 위치 변경

* refactor: QueryBoundary 불필요한 의존성 제거

* refactor: 전역 Provider들의 경계 재조정

* fix: QueryBoundary 임포트 경로 수정

* feat: msw 모듈 경로 수정

* refactor: FoodList 데이터 요청 위치 변경

* feat: exception routes 추가

* feat: exception router에 ErrorPage 적용

* refactor: ErrorBoundaryState 타입을 명시적으로 수정

* feat: ErrorBoundaryValue 타입에 error 타입 추가

* feat: ErrorBoundary fallback에 error 정보도 함께 제공

* feat: CustomError 추가

- RuntimeError
- UnexpectedError

* feat: APIBoundary UnexpectedError 적용

* refactor: error message 수정

* feat: EndOfErrorBoundary 추가

* refactor: UnexpectedError의 메세지 오버라이딩 제거

* feat: APIErrorCode 추가

* refactor: ManageableAxiosError 타입 분리

* feat: APIError 추가

* feat: APIBoundary 통신 성공시 APIError throw

* chore: refresh icon 추가

* chore: home icon height, viewbox 수정

* feat: NOT_FOUND error message 추가

* refactor: UnexpectedError가 모든 value를 받을 수 있도록 수정

* refactor: ErrorPage를 동적으로 수정

- error의 종류에 따라 status와 message 표시
- NotFound page 추가

* refactor: exception routes에 NotFound 페이지 적용

* refactor: UnexpectedError message 변경

* refactor: canManage 조건 수정

* refactor: Error static method 추가

- convertToError 추가
- canManage를 APIError의 static method로 변경

* refactor: CustomError > ZipgoError 네이밍 변경

* feat: useMutationWithToast 추가

* feat: EndOfErrorBoundary 적용

* feat: 전역 staleTime, cacheTime 설정

* feat: reviewList query staleTime 1분으로 설정

* feat: useMutationWithToast critical option 추가

* refactor: APIBoundary가 APIError인 경우 throw하지 않도록 수정

* refactor: ignore key 상수로 분리

* refactor: type only export로 변경 및 named export 그룹화

* refactor: 사용하지 않는 type export 제거

* refactor: 네트워크 에러 메세지를 상수로 분리

* refactor: Unhandled rejection을 에러바운더리에서 처리

* refactor: axios interceptor가 최초 렌더링시에 등록되도록 수정

* refactor: 주석 제거

* refactor: convertToError 로직에서 ZipgoError는 재변환 하지 않도록 변경

* feat: warning icon prefetch

* feat: ErrorCode 타입 기본값 적용

* refactor: AxiosInterceptors 제거

- request interceptor에서 Promise를 리턴하지 않는 문제 수정
- 토큰 만료시 로그인 페이지 리다이렉트 로직을 APIBoundary로 분리

* refactor: RenderProps return type 변경

* feat: resolveRenderProps 함수 추가

* refactor: ErrorBoundary가 무조건 에러를 변환하도록 변경

* feat: isDifferentArray 유틸 함수 추가

* feat: ErrorBoundary 기능 추가

- location 정보가 변경되면 에러가 초기화 되도록 변경
- resetKeys prop 추가

* refactor: APIBoundary에서 401 핸들링을 하도록 변경

* refactor: 함수 선언식을 화살표 함수로 변경

* refactor: APIBoundary 불필요한 에러 재변환 제거

* refactor: composeFunctions와 composeEventHandlers 함수를 통합

* refactor: APIBoundary가 onErrorProps도 실행하도록 변경

* refactor: 기존의 composeEventHandlers를 composeFunctions로 변경

* feat: 메인페이지 하단 '사료 선택 도움말 배너' 추가 (#458)

* feat/#457: 사료 선택 도움말 배너  컴포넌트 추가

* test/#457: 스토리 추가

* feat/#457: 랜딩페이지에 도움말 배너 추가

* refactor/#457: 애니메이션 테마로 분리

* Merge branch 'develop' of https://github.com/woowacourse-teams/2023-zipgo into feature/#457

* fix/#457: 사파리에서 svg 이미지 깨지는 문제 webp 이미지 사용으로 해결

* chore: 스토리북 배포 워크플로우 추가 (#464)

* fix: 스토리북 배포 워크플로우에서 캐시 무효화 로직 삭제 및 mockServiceWorker 경로 수정 (#466)

* chore/#465: 클라우드프론트 캐시 무효화 로직 워크플로우에서 삭제

* chore/#465: 스토리북 mockServiceWorker 경로 설정

* fix: 스토리북 배포 워크플로우 캐시 경로 수정 (#468)

* chore: 프론트엔드 프로젝트 배포 워크플로우에 캐시적용 (#470)

* chore/#469: 프론트엔드 프로젝트 배포 워크플로우에 캐시 적용

* chore/#469: 작업 실행 조건 수정

* feat: 식품 필터 선택 후 선택한 필터 보여주는 기능 추가 (#461)

* feat/#460: 반려견 등록 화살표 삭제

* feat/#460: 선택한 필터 보여줄 때 난독화돼서 나오지 않도록 url복호화

* refactor/#460: 파일 이동

* feat/#460: 선택한 필터 목록 보여주는 기능 추가

* refactor/#460: 컴포넌트명 수정

* refactor/#460: 컴포넌트명 수정

* fix/#460: 잘못된 지표 설명 수정

* refactor/#460: iPhone13 mini에서 도움말 줄바꿈 없이 보이도록 수정

* refactor: else if 문 개선

* refactor: 클릭이벤트핸들러 SelectedFilterItem으로 이동

* refactor: string배열 KEYWORD_EN으로 대체

* refactor: 타입명과 일치하도록 category > keyword로 변수명 수정

* feat: Object.entries 타입 추론을 위한 오버로딩 타입 추가

* refactor: 쿼리스트링에 따라 필터 상태 업데이트 하도록 수정

* refactor: 펫푸드 테스트코드 리팩터링 (#459)

* refactor: PetFoodQueryRepository 테스트간 독립성 보장

* refactor: PetFoodQueryService 테스트간 독립성 보장

* refactor: PetFoodController 테스트간 독립성 보장

* refactor: PetFoodQueryRepository 테스트 수정

* refactor: fixture 수정

* refactor: PetFoodQueryService 테스트 수정

* refactor: PetFoodController 테스트 수정

* refactor: QueryServiceTest 삭제

* refactor: 테스트 환경 통합 및 불필요한 컨테이너 제거

* refactor: abstract 추가

* feat: Datadog Trace 어노테이션 추가 (#475)

* feat: datadog 의존성 추가

* feat: Trace 어노테이션 추가

* feature: ErrorBoundary 사용 방식 변경 및 간소화 (#477)

* refactor: 불필요한 stringify 제거

* refactor: APIError status 타입 지정

* refactor: shouldIgnore 파라미터 타입을 제네릭으로 변경

* feat: BaseFunction type 추가

* feat: resolveFunctionOrPrimitive 유틸 함수 추가

* refactor: APIBoundary onError > ignore로 변경

* refactor: APIError의 method가 get이 아니라면 ignore true로 설정

* refactor: Error field 수정

- ignore > IGNORE_KEY

* refactor: ignore 인터페이스 수정

- boolean도 사용할 수 있도록 변경

* refactor: ErrorBoundary 인터페이스 수정

- mustCatch 추가
- ignore > shouldIgnore로 변경
- EndOfBoundary > CriticalBoundary로 변경
- 기존 shouldIgnore 유틸 함수 > isIgnored로 변경

* chore: nvmrc 추가 v18.16.1

* feat: Loading 컴포넌트 추가

* refactor: 기존 QueryBoundary 사용을 Loading, Suspense로 변경

* feat: 같은 플로우 안의 여러 페이지를 관리하기 위한 퍼널 추상화 및 적용 (#482)

* refactor/#473: navigate 관련 코드 훅 분리

* feat/#473: Funnel, useFunnel 구현

* feat/#473: NonEmptyArray 타입 추가

* feat/#473: ReviewFormFunnel 적용

* refactor/#473: Review페이지 경로 수정

* feat/#473: 템플릿 overflow-y auto로 변경

* feat/#473: 스크롤 디자인 안보이도록 수정

* feat/#473: useFunnel 반환값 객체로 수정

* feat/#473: PetProfile 등록 폼 Funnel 적용

* fix/#473: 믹스견인 경우에만 petSize 기본값 넣어주도록 수정

* feat/#473: 펫 등록 폼 작성 시 페이지 이동해도 상태가 유지되도록 설정

* feat/#473: 폼 작성 중 사용자의 실수를 예방하기 위한 goBackSafely 적용

* feat/#473: 리뷰 스텝 상수화

* fix/#473: 0살(1살미만)일 때 다음 버튼 활성화되도록 수정

* fix/#473: ReviewForm 테스트 깨지는 문제 해결

* refactor/#473: 코드 컨벤션 맞추기 및 불필요한 코드 삭제

* refactor/#473: 인라인 분기문 변수로 추출

* fix: 토큰이 없는 경우 예외 변경 (#480)

* fix: 예외 변경

* test: 테스트 수정

* feat: localhost https 추가 (#485)

* refactor: '사료 선택 도움말 배너'를 닫으면 리액트 내부 페이지 이동 시 안 보이도록 수정 (#486)

* refactor: UI/UX 개선 (#488)

* refactor: AlignSelect를 native select로 변경

- 실제 쿼리스트링과 select option을 동기화
- 아이콘 제거

* refactor: ALIGN_QUERY < REVIEW_ALIGN_QUERY 네이밍 변경

* feat: REVIEW_FILTER_QUERY_STRINGS 상수 추가

* refactor: 불필요한 콜백 제거

* refactor: 리뷰 메타데이터 타입을 상수를 활용하도록 변경

* feat: 리뷰 필터 상태와 쿼리스트링 동기화

* feat: 필터 아이콘 위치 우측으로 변경

* feat: 상수 적용 및 불필요한 useEffect 제거

* refactor: 견종 select 기본 화살표 제거

* feat: ReactQueryDevtools 추가

* refactor: StyledProps $props 형식을 카멜 케이스 네이밍에만 적용

* refactor: theme animation > keyframes로 변경 및 별도의 animation 속성 추가

* refactor: COMMENT_VISIBLE_LINE_LIMIT 오타 수정

* feat: ReviewItem Skeleton 추가

* refactor: 기존 ReviewList > ReviewListAndChart로 변경 및 ReviewList 컴포넌트 분리

* refactor: query key 템플릿 리터럴 제거

* refactor: 변경된 ReviewListAndChart 네이밍 적용

* refactor: query key에 queryString 추가

* refactor: refetch > query key에 queryString을 추가하는 방식으로 변경

* feat: SuspendedImg 추가

* refactor: StarRatingDisplay 별점 이미지 SuspenedImg로 변경

* feat: ReviewControls Skeleton 추가

* refactor: SuspensedImg src를 옵셔널로 변경

* refactor: ReviewItem img > SuspendedImg로 변경

* refactor: 누락됐던 FilterSelectionDisplay 재적용

* feat: SuspenedImg lazy loading 기능 추가

* feat: FoodList Skeleton 추가

* feat: foodList fixture imageUrl 추가

* feat: FoodItem Skeleton 추가 및 LazyImg > SuspendedImg로 변경

* feat: FoodList Skeleton 적용

* feat: FilterBottomSheet 최대 높이 지정

* feat: iPhone8 이하 사이즈 대응

* refactor: ReviewControls 레이아웃 수정

* chore: stylelint rule 추가

* refactor: 사료 필터 목록 레이아웃 최소 높이 설정

* refactor: GuideBanner 작은 디바이스에서 폰트 사이즈 작게 변경

* refactor: 영양기준 국기 이모지 > svg로 변경

* refactor: ReviewList 리뷰 결과 없음 컴포넌트 디자인을 식품 결과 없음과 통일

* fix: NutritionStandardBlock story State를 직접 명명

* refactor: NonEmptyArray type export로 변경

* refactor: styledprops $재적용

* refactor: �OAuth API 호출을 트랜잭션 범위에서 분리 (#471)

* refactor: AuthServiceFacade 적용

* test: AuthServiceFacade를 모킹으로 분리

* test: OAuth API 생성 메서드명 통일

* refactor: 서드파티 성공 응답 fixture 생성

* refactor: AuthControllerTest로 네이밍 변경

* feat: 모바일 디바이스(ios)에서 <input>, <textarea> 포커스 시 자동 zoom-in되는 현상 개선 (#492)

* refactor/#491: 불필요한 코드 삭제

* feat/#491: 글로벌스타일 수정

* fix/#491: 데스크톱 사파리에서 네모로 나오는 라벨 디자인 수정

* feat/#491: 모바일 화면에서 zoom-in되지 않도록 폰트 사이즈 설정

* feat/#491: select border-radius 기본 스타일 제거

* refactor/#491: 중복 css 코드 삭제

* feat: 데스크탑 뷰 전역 레이아웃 구현 (#494)

* feat: DesktopView 구현

* fix: storybook ci 오류 해결

* refactor: redirectUri를 프론트엔드로부터 받는 방식으로 변경 (#456)

* fix: allowCredentials 옵션 및 허용 헤더 추가 (#496)

* feat: 무중단 배포를 위한 환경분리 추가 (#495)

* feat: 쿠키 내 SameSite=None 옵션 추가 (#497)

* fix: allowCredentials 옵션 및 set-Cookie 헤더 추가

* fix: sameSite none 옵션 추가

* fix: sameSite none 옵션 추가

* fix: 쿠키 내 domain 설정 추가 (#498)

* fix: UI 깨짐 해결 (#501)

* feature: 카카오 로그인 redirect uri 동적으로 설정 (#500)

* feat: refreshZipgoAuth api 추가

* feat: response interceptor refresh 로직 추가

* refactor: useNavigate > useEasyNavigate로 수정

* chore: .gitignore *.pem 추가

* feat: https cert key paths 추가

* feat: localhost https 적용

* feat: 환경 변수 추가

- isLocal 추가
- HOMEPAGE 추가
- isDevelop, isProduction, HTTPS 분리
- KAKAO_REDIRECT_URI 삭제 및 webpack에서 동적으로 설정하도록 변경

* feat: 로그인 api 수정

- loginZipgoAuth redirect-uri 쿼리 스트링 추가
- refreshZipgoAuth withCredentials 옵션 추가

* feat: isAuthError static method 추가

* refactor: 불필요한 axios instance 설정 제거

* refactor: 유저 권한 인증 로직 분리 > useCheckAuth

* feat: Priavte route 컴포넌트 추가

* feat: Private route 적용

* refactor: test 코드 제거

* refactor: 카카오 로그인 에러를 Runtime 커스텀 에러로 변경

* refactor: error text가 개행이 가능하도록 변경

* fix: storybook process is not defined 오류 수정

* feat: RefreshToken 전환 (#503)

* feat: RefreshToken 적용

* chore: EOF 추가

* refactor: refreshToken 플로우 변경 (#504)

* docs: README 업데이트 (#505)

* docs: README 업데이트

* docs: README 업데이트

* refactor: 리프레시 쿠키 > JWT 변경 및 버그 + 개선 사항 반영 (#506)

* feat: LoginZipgoaAuth refresh token 추가

* refactor: 기존 refresh token 로직을 쿠키 > JWT로 변경

* fix: FilterDialog Desktop에서 position이 안맞는 현상 수정

* refactor: Template min-height 수정

* refactor: FoodDetailWrapper padding bottom 조절

* refactor: Toast 높이 수정

* refactor: petFoodId type 수정

* refactor: 리뷰 CRUD에 따라 SummaryChart 별점이 동기화 되도록 수정

* fix: UI 깨짐, 스켈레톤 UI 수정 (#513)

* fix: 0살이면 1살 미만으로 뜨도록 수정, 리뷰 더보기 클릭이 안되는 문제 해결 (#512)

* fix/#511: 리뷰 목록 하단 margin 추가

- 리뷰 더보기 클릭이 안되는 문제 해결

* feat/#511: 0살이면 1살 미만으로 뜨도록 수정

* feat/#511: 상품상세 하단 margin 추가

* hotfix: 리뷰, 펫 프로필 업데이트에 따라 상태 동기화 (#514)

* refactor: 불필요한 컴포넌트 분리 병합

* fix: 1분 잘못된 시간 수정

* fix: 리뷰 업데이트에 따라 상품 별점 동기화

* fix: 펫 프로필 업데이트에 따라 펫 프로필 정보 동기화

---------

Co-authored-by: Sangwon Kang <eksovus@gmail.com>
Co-authored-by: wyc <rltgjqmduftlagl@gmail.com>
Co-authored-by: Mooooooo <pjhg410@gmail.com>
Co-authored-by: iamjooon2 <iamjooon2@gmail.com>
Co-authored-by: Seyeon Jeong <79056677+n0eyes@users.noreply.github.com>
Co-authored-by: Kayoung Yoon <dev.kayoung@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[BE] Refresh Token 적용
4 participants