feat: 구글 로그인 — 로그인 창에 구글로 계속하기 버튼, 서버가 구글 ID 토큰 서명·클라이언트 ID·만료를 확인, 처음이면 자동 닉네임으로 가입(구글 이름·이메일은 저장 안 함)
This commit is contained in:
1 parent
eb2151164f
commit
4e9b0bacba
15 files changed
+407
-13
No files matched your search
@@ -22,6 +22,12 @@ class UserCRUD:
|
||||
await s.flush()
|
||||
return user
|
||||
|
||||
async def create_google(self, s: AsyncSession, sub: str, nickname: str) -> User:
|
||||
user = User(login_id=f"google_{sub}", provider_uid=sub, nickname=nickname, provider=2)
|
||||
s.add(user)
|
||||
await s.flush()
|
||||
return user
|
||||
|
||||
async def update(self, s: AsyncSession, user_id: uuid.UUID, values: dict) -> Optional[User]:
|
||||
user = await self.get(s, user_id)
|
||||
if user is None:
|
||||
|
||||
Reference in new issue
Block a user