youtube 계정 연결 작업 완료

This commit is contained in:
HyeongBaeYang committed 2026-02-02 11:13:08 +09:00
1 parent c92d6e2135
commit ef203dc14d
22 files changed
+4521

No files matched your search

+134
View File
@@ -448,6 +448,138 @@ class LogSettings(BaseSettings):
return default_log_dir
# =============================================================================
# Social Media OAuth Settings
# =============================================================================
class SocialOAuthSettings(BaseSettings):
"""소셜 미디어 OAuth 설정
YouTube, Instagram, Facebook 등 소셜 미디어 플랫폼 OAuth 인증 설정입니다.
각 플랫폼의 개발자 콘솔에서 앱을 생성하고 클라이언트 ID/Secret을 발급받아야 합니다.
YouTube (Google Cloud Console):
- https://console.cloud.google.com/
- YouTube Data API v3 활성화 필요
- OAuth 동의 화면 설정 필요
Instagram/Facebook (Meta for Developers):
- https://developers.facebook.com/
- Instagram Graph API 사용을 위해 Facebook 앱 필요
- 비즈니스/크리에이터 계정 필요
TikTok (TikTok for Developers):
- https://developers.tiktok.com/
- Content Posting API 권한 필요
"""
# ============================================================
# YouTube (Google OAuth)
# ============================================================
YOUTUBE_CLIENT_ID: str = Field(
default="",
description="Google OAuth 클라이언트 ID (Google Cloud Console에서 발급)",
)
YOUTUBE_CLIENT_SECRET: str = Field(
default="",
description="Google OAuth 클라이언트 Secret",
)
YOUTUBE_REDIRECT_URI: str = Field(
default="http://localhost:8000/social/oauth/youtube/callback",
description="YouTube OAuth 콜백 URI",
)
# ============================================================
# Instagram (Meta/Facebook OAuth) - 추후 구현
# ============================================================
# INSTAGRAM_APP_ID: str = Field(default="", description="Facebook App ID")
# INSTAGRAM_APP_SECRET: str = Field(default="", description="Facebook App Secret")
# INSTAGRAM_REDIRECT_URI: str = Field(
# default="http://localhost:8000/social/instagram/callback",
# description="Instagram OAuth 콜백 URI",
# )
# ============================================================
# Facebook (Meta OAuth) - 추후 구현
# ============================================================
# FACEBOOK_APP_ID: str = Field(default="", description="Facebook App ID")
# FACEBOOK_APP_SECRET: str = Field(default="", description="Facebook App Secret")
# FACEBOOK_REDIRECT_URI: str = Field(
# default="http://localhost:8000/social/facebook/callback",
# description="Facebook OAuth 콜백 URI",
# )
# ============================================================
# TikTok - 추후 구현
# ============================================================
# TIKTOK_CLIENT_KEY: str = Field(default="", description="TikTok Client Key")
# TIKTOK_CLIENT_SECRET: str = Field(default="", description="TikTok Client Secret")
# TIKTOK_REDIRECT_URI: str = Field(
# default="http://localhost:8000/social/tiktok/callback",
# description="TikTok OAuth 콜백 URI",
# )
# ============================================================
# 공통 설정
# ============================================================
OAUTH_STATE_TTL_SECONDS: int = Field(
default=300,
description="OAuth state 토큰 유효 시간 (초). CSRF 방지용 state는 Redis에 저장됨",
)
# ============================================================
# 프론트엔드 리다이렉트 설정
# ============================================================
OAUTH_FRONTEND_URL: str = Field(
default="http://localhost:3000",
description="OAuth 완료 후 리다이렉트할 프론트엔드 URL (프로토콜 포함)",
)
OAUTH_SUCCESS_PATH: str = Field(
default="/social/connect/success",
description="OAuth 성공 시 리다이렉트 경로",
)
OAUTH_ERROR_PATH: str = Field(
default="/social/connect/error",
description="OAuth 실패/취소 시 리다이렉트 경로",
)
model_config = _base_config
class SocialUploadSettings(BaseSettings):
"""소셜 미디어 업로드 설정
영상 업로드 관련 타임아웃, 재시도, 임시 파일 관리 설정입니다.
"""
# ============================================================
# 업로드 설정
# ============================================================
UPLOAD_MAX_RETRIES: int = Field(
default=3,
description="업로드 실패 시 최대 재시도 횟수",
)
UPLOAD_RETRY_DELAY_SECONDS: int = Field(
default=10,
description="재시도 전 대기 시간 (초)",
)
UPLOAD_TIMEOUT_SECONDS: float = Field(
default=600.0,
description="업로드 타임아웃 (초). 대용량 영상 업로드를 위해 충분한 시간 설정",
)
# ============================================================
# 임시 파일 설정
# ============================================================
UPLOAD_TEMP_DIR: str = Field(
default="media/temp/social",
description="업로드 임시 파일 저장 디렉토리",
)
model_config = _base_config
prj_settings = ProjectSettings()
apikey_settings = APIKeySettings()
db_settings = DatabaseSettings()
@@ -461,3 +593,5 @@ log_settings = LogSettings()
kakao_settings = KakaoSettings()
jwt_settings = JWTSettings()
recovery_settings = RecoverySettings()
social_oauth_settings = SocialOAuthSettings()
social_upload_settings = SocialUploadSettings()