Merge remote-tracking branch 'origin/main' into feat/apps-in-toss

# Conflicts:
#	TODO.md
#	backend/crud/user_crud.py
#	backend/router/v1/auth/account.py
#	backend/router/v1/auth/protocol.py
#	backend/services/auth_service.py
#	compose.yaml
#	docs/이벤트_추적.md
#	frontend/src/api/client/@tanstack/react-query.gen.ts
#	frontend/src/api/client/index.ts
#	frontend/src/api/client/sdk.gen.ts
#	frontend/src/api/client/types.gen.ts
#	frontend/src/b/Sheets.tsx
#	frontend/src/b/region.tsx
#	frontend/src/lib/analytics.ts
This commit is contained in:
minaChoi committed 2026-10-23 16:22:18 +09:00
commit 84212099e6
285 files changed
+39026 -767

No files matched your search

+12 -1
View File
@@ -11,7 +11,7 @@ from common.enums import AuthProvider, ErrorType
from common.logger import LOG
from common.models.errors import error_info
from config.settings import settings
from router.v1.auth.protocol import Me, Req_Login, Req_Refresh, Req_Signup, Req_TossLogin, Req_TossUnlink, Req_UpdateMe, Res_Auth, Res_Logout, Res_Me, Res_TossUnlink
from router.v1.auth.protocol import Me, Req_Google, Req_Login, Req_Refresh, Req_Signup, Req_TossLogin, Req_TossUnlink, Req_UpdateMe, Res_Auth, Res_AuthConfig, Res_Logout, Res_Me, Res_TossUnlink
from services.auth_service import AuthService
router = APIRouter(prefix="/v1/auth", tags=["auth"])
@@ -66,6 +66,17 @@ async def toss_unlink(req: Req_TossUnlink, authorization: Optional[str] = Header
return Res_TossUnlink() if err is ErrorType.SUCCESS else Res_TossUnlink(result=error_info(err))
@router.post("/google", response_model=Res_Auth, response_model_exclude_none=True, summary="구글 로그인 (처음이면 자동 닉네임으로 가입)")
async def google_login(req: Req_Google, service: AuthService = Depends()) -> Res_Auth:
err, user = await service.google(req.credential)
return _auth(err, user, service)
@router.get("/config", response_model=Res_AuthConfig, response_model_exclude_none=True, summary="로그인 화면 설정 (구글 클라이언트 ID)")
async def auth_config() -> Res_AuthConfig:
return Res_AuthConfig(google_client_id=settings.google_client_id or None)
@router.post("/refresh", response_model=Res_Auth, response_model_exclude_none=True, summary="토큰 재발급")
async def refresh(req: Req_Refresh, service: AuthService = Depends()) -> Res_Auth:
err, user = await service.refresh(req.refresh_token)
+8
View File
@@ -1,5 +1,7 @@
from typing import Optional
from pydantic import Field
from common.enums import AuthProvider
from common.models.gmodel import Req_WebPacketProtocol, Res_WebPacketProtocol, WebPacketProtocol
@@ -24,6 +26,8 @@ class Req_TossUnlink(Req_WebPacketProtocol):
"""토스가 보내는 모양 그대로 (camelCase)"""
userKey: int
referrer: str
class Req_Google(Req_WebPacketProtocol):
credential: str = Field(min_length=20, max_length=4096, description="구글 로그인 버튼이 준 ID 토큰")
class Req_Refresh(Req_WebPacketProtocol):
@@ -62,3 +66,7 @@ class Res_Logout(Res_WebPacketProtocol):
class Res_Me(Res_WebPacketProtocol):
me: Optional[Me] = None
class Res_AuthConfig(Res_WebPacketProtocol):
google_client_id: Optional[str] = Field(None, description="구글 로그인 버튼에 쓸 OAuth 클라이언트 ID. 없으면 구글 로그인을 숨긴다")