v0.0.27 | Google 소셜 로그인 기능 추가
All checks were successful
Build And Test / build-and-push (push) Successful in 2m12s

- Google ID Token 검증 및 로그인/회원가입 기능
- 기존 계정 연동 기능 (비밀번호 확인 후 연동)
- 프로필에서 Google 연동/해제 기능
- CustomUser 모델에 social_provider, social_id, profile_image 필드 추가

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-18 19:53:43 +09:00
parent 9204e56152
commit 27d7101f0f
8 changed files with 447 additions and 3 deletions

View File

@ -4,12 +4,14 @@ from rest_framework_simplejwt.serializers import TokenObtainPairSerializer
from rest_framework.exceptions import ValidationError
class RegisterSerializer(serializers.ModelSerializer):
password = serializers.CharField(write_only=True)
password = serializers.CharField(write_only=True, required=False)
class Meta:
model = CustomUser
fields = ("email", "name", "password", "grade", "desc",
"phone", "address", "gender", "birth_date", "education")
"phone", "address", "gender", "birth_date", "education",
"social_provider", "profile_image")
read_only_fields = ("social_provider", "profile_image")
def validate_email(self, value):
if CustomUser.objects.filter(email=value).exists():