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

[#171] Protect route on client side #259

Merged
merged 1 commit into from
Mar 12, 2024
Merged

Conversation

2wheeh
Copy link
Collaborator

@2wheeh 2wheeh commented Mar 12, 2024

#171

Changes

Auth Context 에서 protectedPaths 에 접근 시 유효한 토큰으로 로그인 되어있는지 확인합니다.

이전에 논의한 대로 일단은 클라이언트 사이드에서 auth 관련 로직을 모두 처리합니다.
따라서 페이지 가드 역시 클라이언트 사이드에서 이뤄집니다.
백엔드를 통해 유효한 유저인지 확인되기 전까지의 잠깐동안 SSR 된 컴포넌트가 보여질 수 있습니다.

인증이 필요한 데이터는 애초에 서버사이드에서 다루지 않는 구조이므로, 혹시 어색할 수 있는 유저 경험외에 큰 문제는 없어보입니다.

@2wheeh 2wheeh added the ui Something about UI label Mar 12, 2024
@2wheeh 2wheeh requested review from isutare412 and skgndi12 March 12, 2024 04:44
@2wheeh 2wheeh self-assigned this Mar 12, 2024
Copy link

@isutare412 isutare412 self-requested a review March 12, 2024 06:33
Copy link

Copy link
Collaborator

@isutare412 isutare412 left a comment

Choose a reason for hiding this comment

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

고생하셨습니다 👍

@2wheeh 2wheeh force-pushed the feature/issue-171/protect-route branch from 4f0fe89 to 3094212 Compare March 12, 2024 10:41
@2wheeh 2wheeh merged commit 09eb92e into develop Mar 12, 2024
2 checks passed
@2wheeh 2wheeh deleted the feature/issue-171/protect-route branch March 12, 2024 10:42
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ui Something about UI
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants