8 | Token authentication using django rest framework | By Hardik Patel

  Рет қаралды 34,279

Hardik Patel

Hardik Patel

Күн бұрын

Пікірлер: 46
@muruganraja9
@muruganraja9 3 жыл бұрын
Is django default token authentication secure sir...
@akashjadhav5077
@akashjadhav5077 3 жыл бұрын
hi can you make video on aws cognito with DRF
@jintuthomas6766
@jintuthomas6766 3 жыл бұрын
hi ..i got Forbidden (CSRF cookie not set.)? how to solve this?
@kamtanath4494
@kamtanath4494 6 жыл бұрын
I am trying to authentic with custom user model, but getting following error, is there any thing else that I need to add { "non_field_errors": [ "Unable to login with given credentials." ] } And this is my extended class class User(AbstractUser): bio = models.TextField(max_length=500, blank=True) location = models.CharField(max_length=30, blank=True) birth_date = models.DateField(null=True, blank=True) def __str__(self): return self.first_name
@Murga_Mutton
@Murga_Mutton 4 жыл бұрын
Excellent video.
@FahadAli-ot5kn
@FahadAli-ot5kn 4 жыл бұрын
For functional view please make another video
@jacksm8709
@jacksm8709 4 жыл бұрын
best of them all thanks man......
@SaurabhYadavYT
@SaurabhYadavYT 6 жыл бұрын
I'm developing a webpage in which after validating the user we redirect user to new page(which is only available with valid token). How we pass the token (we get after validating the user) when redirecting user to new page. I'm using Angular as front-end. and very very new to Web Develop.
@hafeezshaik1221
@hafeezshaik1221 4 жыл бұрын
Hi bro, how can authenticate manually created tables fields of mysql workbench in django restframe work and how to return token , some data.... please give me answer
@prabhashswain1878
@prabhashswain1878 4 жыл бұрын
Can anyone help me
@prabhashswain1878
@prabhashswain1878 4 жыл бұрын
@@HardikPatelN yes sir ,but how can I send user object from serializers.py to login views
@waleedahmed7138
@waleedahmed7138 5 жыл бұрын
What about registering user?
@sarojpaudel7479
@sarojpaudel7479 4 жыл бұрын
Hello Aarav, now my every other api call is asking for token after i created the login api view using token authentication. I dont need user to login to simply view other blog-posts. How can I solve this??
@sarojpaudel7479
@sarojpaudel7479 4 жыл бұрын
@@HardikPatelN Thank you, it worked. Also, I used [AllowAny] to all the other serializers.It also worked.
@mehboobshaikh8396
@mehboobshaikh8396 3 жыл бұрын
can you make a video on how to integrate Django rest framework with Keycloak?
@krranjan1985
@krranjan1985 4 жыл бұрын
my doubt is i've already completed the token authentication using django superuser but how we can do custom token authentication using email and password. if i have the model data like email, password, age, name ...etc and i am using filter option to get details in post method now i want to generate that email and password that i have store in my database and show the rest of the result as a response 200_ok.
@krranjan1985
@krranjan1985 4 жыл бұрын
if you want i will show the code.
@djsamke384
@djsamke384 6 жыл бұрын
Hi sir, may i ask, What is the difference between the generic views and the viewset we used in the beginning, in the employee views?
@hemanth6951
@hemanth6951 5 жыл бұрын
How it sync with google signin in Android
@kaoutharasma6567
@kaoutharasma6567 4 жыл бұрын
You are a life saver
@ankitagarwal923
@ankitagarwal923 5 жыл бұрын
Can you please help me out from the problem that it provides authentication credentials not provide How can I fix it
@vinodshetty2261
@vinodshetty2261 5 жыл бұрын
Thanks Hardik...u saved my time
@djsamke384
@djsamke384 6 жыл бұрын
Sir, you forgot to check to make sure that a user is the one who created the post so that they are not allowed to update, delete or overwrite another user's posts.
@djsamke384
@djsamke384 6 жыл бұрын
Can you please let me know when you do that because I can't fine anything like the Userpassestestmixin that you can use on django forms... I tried integrating it into our generic views but it keeps saying "instance has no attribute created_by"
@vipinsharma9283
@vipinsharma9283 5 жыл бұрын
Hi Hardik in Login Serializer class you have used authenticate(username=username,password=password) where request will be taken as None but is not working in my system It is returning None Can you explain me
@npatel7815
@npatel7815 5 жыл бұрын
Hi Hardik, is there any way to create an api that allows superuser to login into other user account by given user id? please share me your idea. Thank you so much!
@abhinav_agnihotry
@abhinav_agnihotry 5 жыл бұрын
You can use the django's impersonate library
@npatel7815
@npatel7815 5 жыл бұрын
@@abhinav_agnihotry there is also django-loginasuser package.Thanks!
@MiniAishwarya
@MiniAishwarya 6 жыл бұрын
Sir how do you take a token from a third party API to the Rest api? How is a connection established with the third party? Can you please tell me?
@MiniAishwarya
@MiniAishwarya 6 жыл бұрын
For getting information like dialog flow, skyscanner, etc.
@MiniAishwarya
@MiniAishwarya 6 жыл бұрын
Aaah got it. Thank you so much.
@ultiumlabs4899
@ultiumlabs4899 5 жыл бұрын
Hi, great video thanks. out of topic: What is VS code extension you installed so we could have intellisense methods pop up here like appeared here 7:36 ?
@successontap6552
@successontap6552 6 жыл бұрын
The best video I have seen on the subject!
@successontap6552
@successontap6552 6 жыл бұрын
When testing the API using postman I get the following error: "CSRF verification failed. Request aborted." My REST_FRAMEWORK settings are correct and I have cleared cookies. Any idea why this is happening in my app and not your video?
@naveenvadavalasa
@naveenvadavalasa 6 жыл бұрын
Started with token authentication ended with session authentication. You have mixed up every thing...
@vinodreddy1722
@vinodreddy1722 6 жыл бұрын
sir u have showed both session and token authentication so little bit confusing ,could you please make differentiate session and token authentication. sir one more doubt where we are creating username password initially is it superuser?
@vinodreddy1722
@vinodreddy1722 6 жыл бұрын
Aarav Tech tq sir really hats off u, i suggested these videos to my frds
@vinodreddy1722
@vinodreddy1722 6 жыл бұрын
sir one more doubt at 21.32 if we login second time its throwing some error,but it is login only r8 then why we want to pass tokens in header? or do we need to pass token in every request header after login ,am i r8?
@shahbozabdullayev5583
@shahbozabdullayev5583 4 жыл бұрын
Whatta Fck! Who uses light theme! My eyes got binded!
@pankajkulkarni3554
@pankajkulkarni3554 5 жыл бұрын
hardik i have used your code but raisd bad request
@RamaKrishna-mk3zm
@RamaKrishna-mk3zm 6 жыл бұрын
Hi sir, i am new Rest API, my doubt is: in real time applications, how to perform login api, then how to capture token received and how to use it in next post/put api's. how to achieve this ? or what are required to get above done without manual intervention.
@hodophile_footsteps
@hodophile_footsteps 5 жыл бұрын
@@HardikPatelN hi Aarav, i need to capture the token from the frontend request and authenticate the token by django rest api and respond to a get method..Can you help?
@abhinav261
@abhinav261 5 жыл бұрын
perfect blog bro salute you
@bhaveshagarwal1766
@bhaveshagarwal1766 5 жыл бұрын
How to remove token after user logged out
@uweopfern
@uweopfern 6 жыл бұрын
I have two questions on this tutorial first can yu explain to me this line (token, created = Token.objects.get_or_create(user=user)) Second pls allow me to have much explanation on logoutView ```class LogoutView(APIView): authentication_classes = (TokenAuthentication,) def post(self, request): django_logout(request) return Response(status=204)```
@jhdstkjbdryiibc
@jhdstkjbdryiibc 5 жыл бұрын
Thx, you saved me)
小丑揭穿坏人的阴谋 #小丑 #天使 #shorts
00:35
好人小丑
Рет қаралды 34 МЛН
3 | Serializations in Django Rest Framework | By Hardik Patel
25:50
Full Stack React & Django [5] - Django Token Authentication
45:05
Traversy Media
Рет қаралды 126 М.
How to Handle User Authentication in Django
26:39
Matt Freire
Рет қаралды 86 М.
JSON Web Tokens With Django REST Framework
16:58
Pretty Printed
Рет қаралды 91 М.
ViewSets in Django Rest Framework and Types #10
13:26
IamPython
Рет қаралды 11 М.
OAuth 2.0 and OpenID Connect (in plain English)
1:02:17
OktaDev
Рет қаралды 1,7 МЛН