Skip to content

Feature/auth shared client#19

Merged
Jaeho-Site merged 7 commits into
devfrom
feature/auth-shared-client
May 16, 2026
Merged

Feature/auth shared client#19
Jaeho-Site merged 7 commits into
devfrom
feature/auth-shared-client

Conversation

@Jaeho-Site

Copy link
Copy Markdown
Contributor

변경 사항

📌 작업 목적

Github OAuth 및 향후 API 통신을 위한 기반 인프라와 공용 클라이언트를 세팅합니다.
(이 PR은 도메인 로직에 의존하지 않는 순수 shared 계층 작업입니다.)

🛠️ 주요 변경 사항

  • 패키지 추가: axios, @tanstack/react-query, react-router-dom
  • API 클라이언트 구성: shared/api/client.ts에 Axios 인스턴스 생성
  • 인터셉터 적용: 401 Unauthorized 에러 시 토큰을 갱신하는 Refresh 로직 구현
  • 토큰 관리: shared/api/token-store.ts 세팅

@vercel

vercel Bot commented May 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
stackup Ready Ready Preview, Comment May 15, 2026 4:59pm


export const apiClient = axios.create(baseConfig)

const refreshClient = axios.create(baseConfig)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

apiClient와 refreshClient가 별도로 만드셨군요 좋습니다

return next
}

// 401과 403을 분리할 필요가 있다고 생각햤습니다.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

정말 정말 사소하지만 오타가 있네요
다른 부분은 모두 좋습니다

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

401 403은 백엔드 쪽이랑 얘기해봐야 명확하게 정할 수 있겠네요

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

주석은 추후에 API명세를 명확히 하고 제거할 예정이라 그대로 둘게요 :)

@Jaeho-Site Jaeho-Site merged commit 4ca5424 into dev May 16, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants