Conversation
- authStore 추가 - persist 미들웨어로 localStorage 연동 - User, AuthProvider 타입 분리
Summary of ChangesHello @AndyH0ng, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 이 PR은 Zustand를 도입하여 애플리케이션의 전역 인증 상태를 효율적으로 관리하고, 로컬 개발 환경 설정을 개선하며 환경 변수 관리를 위한 포괄적인 문서를 제공합니다. 이를 통해 개발자는 인증 상태를 쉽게 제어하고, 다양한 환경에서 일관된 방식으로 애플리케이션을 개발하고 빌드할 수 있습니다. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
이번 PR은 Zustand를 사용하여 인증 상태를 전역으로 관리하고, 로컬 개발 환경 설정을 개선하는 내용을 담고 있습니다. 새로운 authStore를 도입하여 로그인, 로그아웃, 사용자 정보 업데이트 기능을 구현하셨네요. 또한, dev:local 스크립트 추가와 환경 변수 문서화는 다른 개발자들이 프로젝트에 참여하기 용이하게 만들어주는 좋은 변경입니다. 코드 리뷰에서는 authStore의 상태 설계를 개선할 수 있는 점을 제안했습니다. isAuthenticated 상태를 accessToken 유무에 따라 파생되도록 변경하면, 상태의 중복을 제거하고 불일치 가능성을 줄여 코드의 안정성을 높일 수 있을 것입니다. 전반적으로 인증 관리의 기반을 잘 마련했으며, 문서화도 꼼꼼하게 진행해주셔서 좋습니다.
- TO BE: 컴포넌트에서 필요할 때 `const isAuthenticated = useAuthStore(state => !!state.accessToken);` 와 같이 파생해서 사용합니다.
📌 관련 이슈
✨ 변경 내용
💡 참고 사항
Discord에 공유된 openapi.yml을 레퍼런스로 작업합니다. (26.1.3 기준)
해야할 것
ProtectedRoute로 접근을 제한합니다