-
Notifications
You must be signed in to change notification settings - Fork 5
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] 로그인 구축으로 인한 인증 전략 변경 #837
Open
jinhokim98
wants to merge
19
commits into
fe-dev
Choose a base branch
from
feature/#836
base: fe-dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 17 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
c4fa5b4
fix: 병합하면서 제대로 반영되지 않은 코드 수정
jinhokim98 64391f1
feat: 이벤트 정보 createdByGuest 필드 추가 반영
jinhokim98 bf04699
style: 게스트 로그인 페이지로 이름 변경
jinhokim98 13b80c3
feat: 게스트, 회원 관리 로그인 분리
jinhokim98 b643c8d
feat: 인증되지 않았을 때 fallback 새로운 url로 이동하도록 설정
jinhokim98 94fdfa7
feat: 인증 api 요청할 때 세션스토리지에 createdByGuest 저장
jinhokim98 5c07cf3
feat: 인증되지 않았을 때 이전 페이지 저장 후 로그인 페이지로 이동
jinhokim98 2f1ff3b
fix: location.pathname으로 navigate 값 수정
jinhokim98 e8e5e71
feat: 로그인에 성공했을 때 이전의 주소로 이동하는 기능 구현
jinhokim98 11e06a1
fix: StrictMode에서도 제대로 동작하도록 수정
jinhokim98 3171653
fix: 이벤트 베이스 url을 기반으로 라우트하는 방식으로 변경
jinhokim98 7210997
feat: 회원 생성 이벤트 로그인 화면 제작
jinhokim98 6014624
refactor: kakao redirect uri 변경으로 인한 카카오 로그인 로직 분리
jinhokim98 b4b2dba
fix: 함수 호출 실수 바로잡기
jinhokim98 4308e06
feat: 이벤트 전체정보 보장을 위해 useSuspenseQuery 사용
jinhokim98 8b44b26
style: suspense query를 사용함으로 ? 키워드 삭제
jinhokim98 03ce768
refactor: createByGuest로 상황에 맞는 navigate 하는 책임 useRequestPostAuthenti…
jinhokim98 68aeb04
refactor: previousUrl 이중부정구문 긍정으로 개선
jinhokim98 15f57d6
refactor: 카카오 계정 로그인 강조 길이 변경
jinhokim98 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
const SESSION_STORAGE_KEYS = { | ||
closeAccountBannerByEventToken: (eventToken: string) => `closeAccountBanner-${eventToken}`, | ||
closeDepositStateBannerByEventToken: (eventToken: string) => `closeDepositStateBanner-${eventToken}`, | ||
createdByGuest: 'createdByGuest', | ||
previousUrlForLogin: 'previousUrlForLogin', | ||
} as const; | ||
|
||
export default SESSION_STORAGE_KEYS; |
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
22 changes: 22 additions & 0 deletions
22
client/src/hooks/queries/auth/useRequestPostAuthentication.ts
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
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
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
정말 별거 아닌 호기심입니다만.. previousUrl의 타입이 undefined가 아닐 때에만 세션 스토리지를 set하도록 해주셨잖아요.
previousUrl === 'string'
이 아닌previousUrl !== 'undefined'
로 해주신 이유가 궁금합니다!previousUrl에는 타입이 string이나 undefined가 아니면 컴파일시에 타입 오류가 발생하기 때문에 해당 goKakaoLogin 함수가 실행되지 않을 것 같단 말이죠? 그래서 저라면 부정문 보다는 긍정문이 코드 이해에 더 좋을 것 같고, previousUrl은 무조건 string이어야 하기 때문에 if문 조건을 string으로 뒀을 것 같은데.. undefined로 하신 이유가 궁금합니다.
해당 질문은 정말 별거 아니고.. 저랑 다른 생각 구조(?)를 가지신 것 같아서 궁금해서 여쭤보는 겁니다!
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.
파라미터를 넘길 때 previousUrl이 있는 경우가 있고 없는 경우가 있어서 undefined 체크를 했어요.
인증에 실패해서 돌아가야할 곳이 없는 경우를 체크하기 위해서였는데 "파라미터가 없지 않을 경우"에 실행한다 다시 생각해보니 어색하네요.
소하 의견대로 파리미터가 없을 경우 얼리리턴이나 파라미터가 있을 경우가 더 좋은 것 같아요