-
Notifications
You must be signed in to change notification settings - Fork 1
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
대략적인 인증 로직 구현 및 서버 통신 환경 설정 #46
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
어차피 컨텍스트 내부의 값이 바뀌면 다시 렌더링해야하기 때문에 불필요하다고 생각. 추후에 논의해볼 필요가 있음
어차피 컨텍스트 내부의 값이 바뀌면 다시 렌더링해야하기 때문에 불필요하다고 생각. 추후에 논의해볼 필요가 있음
mingkyeongg
approved these changes
Nov 1, 2024
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.
고생하셨습니다~
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
변경점 👍
변경점 매우 많으니 꼼꼼히 읽어주세요
endpoint를 정의하는 모듈을 만들었습니다.
axios interceptor을 이용해서 헤더에 토큰 삽입/인증 실패 시 reissue 작업을 자동화했습니다.
src/api 내부에
서버와 통신할 때 사용할 메소드(이하 api 메소드)
를 정의했습니다. 메소드 작성 방식은 아래와 같습니다.페이지 템플릿을 작성했습니다. 이는
src/pages
내부에 작성할 페이지 컴포넌트에 적용할 템플릿입니다. hideHeader, hideFooter이라는 boolean prop으로 네비게이션 바/푸터 숨기기 여부를 설정할 수 있습니다.메인 페이지를 작성했고 라우트 처리까지 완료했습니다.
access Token의 경우 tokenStroage라는 객체를 통해 접근이 가능합니다.
매우 중요
이제부터 백엔드 api와 연결 작업을 본격적으로 수행해야 할 텐데, 프로젝트 최상위 경로에(src와 같은 경로. src 내부 아님) .env 파일에 서버 url을 아래와 같이 정의해둬야 합니다.