Skip to content

Feature/auth core logic#20

Merged
Jaeho-Site merged 12 commits into
devfrom
feature/auth-core-logic
May 16, 2026
Merged

Feature/auth core logic#20
Jaeho-Site merged 12 commits into
devfrom
feature/auth-core-logic

Conversation

@Jaeho-Site

Copy link
Copy Markdown
Contributor

변경 사항

📌 작업 목적

인증 도메인(features/auth)에 종속적인 비즈니스 로직과 UI 컴포넌트를 구현합니다.
(PR 1의 shared 계층을 기반으로 작성되었습니다.)

🛠️ 주요 변경 사항

  • 인증 모델 및 훅: AuthContext, AuthProvider, useAuth 커스텀 훅 구현
  • API 연결: 로그인, 로그아웃 등 Auth 관련 API 호출 함수 추가 (features/auth/api/)
  • UI 컴포넌트: GithubLoginButton, 라우트 가드를 위한 RequireAuth 컴포넌트 구현

@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 16, 2026 11:48am

@Jaeho-Site Jaeho-Site changed the base branch from dev to feature/auth-shared-client May 15, 2026 17:01
Comment thread frontend/src/features/auth/api/auth.ts Outdated
'/api/auth/github/callback',
{
params: { code, state },
withCredentials: true,

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.

이전 PR 에서 baseConfig에 withCredentials가 true로 설정되어있던데
여기서 다시 설정해주네요

강조하기 위해서 였다면 상관없긴합니다

@Jaeho-Site Jaeho-Site May 16, 2026

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.

코드 다듬을 시간이 적어서 중복이 생겼네요. 강조의도는 없었고 중복을 줄이는 방향이 좋아보입니다.

Comment thread frontend/src/features/auth/api/auth.ts Outdated

export async function logout(): Promise<void> {
await apiClient.delete('/api/auth/logout', {
withCredentials: true,

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.

여기도 마찬가지입니다

import type { AuthUser, LoginResponse } from './types'

export type AuthStatus =
| 'idle'

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.

[단순질문] idle과 loading 이 어떤 차이일까요?

@Jaeho-Site Jaeho-Site May 16, 2026

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.

확장성을 위한 타입이지만, 저희 컨벤션상 미리 정의해두는 코드는 지양하자고 되어있네요. 일단 없애고 필요해질 때 사용하는것이 맞아보입니다.

onError?: (error: unknown) => void
}

const BASE_CLASS =

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.

비슷한 버튼이 늘어난다면 shared 로 뺴는 것도 괜찮아보입니다.

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.

동의합니다. 두번까지는 각각 사용해도 문제가 없다고 생각하고 3번정도 겹칠 때 분리를 고려하면 좋을 것 같아요.

@Jaeho-Site Jaeho-Site changed the base branch from feature/auth-shared-client to dev May 16, 2026 12:20
@Jaeho-Site Jaeho-Site merged commit df58cc2 into dev May 16, 2026
2 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.

3 participants