Lets Add Token Authentication To our Django REST Framework Ecommerce API

Опубликовано: 28 Сентябрь 2024
на канале: Faith Olusegun
1,704
36

Lets Add Token Authentication to our Django REST Framework Ecommerce API

In our previous video on Django Rest Framework, We created minimalistic RESTful API's for an Ecommerce store, today, we shall add Token Authentication to our API's

Lets Create an Ecommerce API with Django and Django Rest Framework -    • Lets Create an Ecommerce API with Dja...  

See the Github Repository for the project - https://github.com/propenster/youtube...

Video 1: Lets Create an Ecommerce API with Django and Django Rest Framework -    • Lets Create an Ecommerce API with Dja...  

Vieo 2: Lets Add Token Authentication To our Django REST Framework Ecommerce API -    • Lets Add Token Authentication To our ...  

Video 3: Lets Add Cors and Implement a Cart Feature in our Django REST Framework Ecommerce API -    • Lets Add Cors and Implement a Cart Fe...  

Video 4: How to Add JWT Authentication, User Registration and Login in Django Rest Framework Ecommerce API -    • How to Add JWT Authentication, User R...  

STEPS:

+ we'll integrate rest_framework permissions into all our views
+ we'll add DRF rest_framework.authtoken to INSTALLED_APPS in our settings.py
+ We'll set the DRF TokenAuth config in settings.py - DEFAULT_AUTHENTICATION_CLASSES
+ Rerun migrations
+ Test Token Generation - on the CMD using the command - python manage.py drf_create_token {username}

+ FInally Create an Endpoint - route for users to obtain Token for Auth.


Thank you for taking time to watch this tutorial, and I hope you like it. Please comment below if you feel the tutorial is beginner-friendly and understandable enough.
Also, like and subscribe to this channel if you like what you see.

NEXT tutorial is on extending this project and integrating Auth User model, authenticating and making more API resources

Thank you very much.
Faith.