풀스택 개발 공부로그

Django OAuth2.0 Library(allauth, rest-auth)

|

OAuth2 allauth, rest-auth

OAuth 2.0 — OAuth Integrate OAuth 2 Into Your Django/DRF Back-end | Toptal

rest-auth

Introduction — django-rest-auth 0.9.5 documentation

django-rest-auth, a set of REST API endpoints to handle User Registration and Authentication tasks. By having these API endpoints, your client apps such as AngularJS, iOS, Android, and others can communicate to your Django backend site independently via REST APIs for User Management.

  • User Registration with activation
  • Login/Logout

DRF 유저 등록, 로그인, 로그아웃 기능 제공

all auth

Overview — django-allauth 0.32.0 documentation

  • Signup of both local and social accounts
  • Connecting more than one social account to a local account

소셜(구글, 페이스북, 카카오 등) 인증기반 유저관리 기능 제공

JWT Support

django-rest-auth에서는 기본적으로 Token-based authentication를 사용합니다. JWT authentication를 사용하고 싶다면 djangorestframework-jwt를 사용합니다.

Unlike some more typical uses of JWTs, this module only generates authentication tokens that will verify the user who is requesting one of your DRF protected API resources. The actual request parameters themselves are not included in the JWT claims which means they are not signed and may be tampered with. You should only expose your API endpoints over SSL/TLS to protect against content tampering and certain kinds of replay attacks.

curl -H "Authorization: JWT <your_token>" http://localhost:8000/protected-url/

DRF 공식문서에서는 djangorestframework-simplejwt를 사용합니다.