-
Notifications
You must be signed in to change notification settings - Fork 0
feat: 로그아웃 api연결 및 인터셉트 분기 처리 수정 #29
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
base: dev
Are you sure you want to change the base?
Conversation
sungwonnoh
commented
Oct 25, 2025
- 로그아웃 api연결
- 401 에러 인터셉트 분기처리
Summary of ChangesHello @sungwonnoh, 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은 사용자 인증 흐름의 안정성과 사용자 경험을 개선하기 위해 로그아웃 기능을 API와 연동하고, 401 인증 에러 처리 로직을 고도화합니다. 특히, 만료된 토큰을 자동으로 재발급하여 사용자 세션을 유지하고, 유효하지 않은 토큰에 대해서는 즉시 로그아웃 처리하여 보안을 강화하는 데 중점을 두었습니다. 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
이번 PR은 로그아웃 API 연동과 Axios 인터셉터를 사용한 401 에러 처리 로직 개선에 중점을 두고 있습니다. 전반적으로 토큰 만료 시 재발급 및 요청 재시도 로직이 잘 구현되었습니다. 코드의 안정성과 유지보수성을 더욱 높이기 위해 타입 안정성 강화, API 엔드포인트 일관성, 그리고 에러 처리 강화에 대한 몇 가지 제안 사항을 리뷰에 남겼습니다.
| return res; | ||
| }, | ||
| async (error) => { | ||
| const originalRequest = error.config; |
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.
error.config 객체에 _retry 속성을 동적으로 추가하고 있습니다. 이는 타입스크립트의 정적 타입 검사를 우회하는 방식으로, 코드의 가독성과 안정성을 저해할 수 있습니다. AxiosRequestConfig를 확장하는 별도의 인터페이스를 선언하여 _retry 속성을 명시적으로 정의하는 것이 좋습니다.
import { AxiosRequestConfig } from "axios";
interface RetryableAxiosRequestConfig extends AxiosRequestConfig {
_retry?: boolean;
}
// ...
const originalRequest = error.config as RetryableAxiosRequestConfig;이렇게 하면 _retry 속성의 존재와 타입을 명확히 할 수 있어 실수를 방지하고 코드 이해도를 높일 수 있습니다.