- shared/auth 모듈: AuthProvider, ProtectedRoute, useAuth, authApi - 페이지: LoginPage(Google OAuth), PendingPage, DeniedPage - WING_PERMIT 역할 기반 접근 제어 - Topbar에 사용자 이름 + 로그아웃 버튼 추가 - App.tsx에 react-router 라우팅 + AuthProvider 래핑 - DEV 모드 Mock 로그인 지원 (김개발) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
7 lines
146 B
TypeScript
7 lines
146 B
TypeScript
import { useContext } from 'react';
|
|
import { AuthContext } from './AuthContext';
|
|
|
|
export function useAuth() {
|
|
return useContext(AuthContext);
|
|
}
|