-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[accounts] dj-rest-auth 패키지 활용 여부 #2
Comments
jseop-lim
added a commit
that referenced
this issue
May 12, 2022
POST로 입력받은 Kakao access token을 kakao 인증 서버에 제출하여 사용자 프로필 정보를 얻어온다. 프로필 정보에 포함된 uid를 통해 로그인 하는 사용자 객체를 얻고, 만약 없다면 새로운 SocialUser, User 인스턴스를 생성한다. (serializer) SocialLoginSerializer, KaKaoLoginSerializer 정의 유효성 검사 과정에서 kakao 인증 서버에 접속하여 프로필 정보를 얻어옴 KaKaoLoginSerializer는 SocialLoginSerializer를 상속받도록 구현 (view) KakaoLoginView 정의. 메서드 post(), get_app_user() 정의 kakao 서버에서 authentication code와 access token을 받아오기 위한 테스트 용도의 kakao_login(), kakao_callvack() 함수 정의 (url) config에 'accounts.urls', accounts에 'kakao-login' 추가 테스트 용도의 'kakao', 'kakao-callback' 추가 (#2)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
django-allauth, dj-rest-auth, rest_framework_simplejwt를 모두 사용
장점
구현이 편하다
단점
안쓰는 view, serializer가 너무 많다.
User 확장 방식이 획일적이고 반드시 unique한 username이나 email 사용해야 함
rest_framework_simplejwt만 사용
장점
원하는 기능만 커스텀하여 압축적인 구현
단점
구현 깊이 증가
The text was updated successfully, but these errors were encountered: