This is great. Thanks so much. As someone learning development, I have a decent understanding of building a simple API, and a simple frontend separately, but linking the 2 together like this is really not demonstrated enough and is super useful!
Your videos are incredible. I would like to ask a question. I noticed that the link named Post is no longer in the Navbar file for this project, as it was in the previous video. In this video he appears on the page with the posts, so I would like to know where he is being indicated?
Hey Samer, thank you. Glad you found it useful. I will get back onto Vue.JS soon enough. The first tutorial I will do will be based around the Django Restful tutorial series I am doing at the moment where I will take this tutorial much further and in more detail. There is a few things missing if I remember from this tutorial - Not sure I got the refresh token working for example. 👍
Great tutorial, i love it. Please, when will you implement the full login part, especially saving the token so that it dosen't log me out when ever i refresh. Also i'll like to see a tutorial where i can implement authorize view base on two or more conditions. thanks
Greatest tutorial in a whole youtube on django&vue authentication ! All these timecodes and stuff, lots of preparations for high quality content, thank you !!! Please continue Python & Vue stack, its so little about this in the whole Web, in comparison with other frontend frameworks... P.S. im getting automatically logged out silently using your github code, what can be the problem? P.P.S can you make a full sign up, sign in, sign out tutorial, plz ? ( that was sooo cloze :) ) P.P.P.S perfect english man, pleasure to listen )
Thanks Kirill, RUclips is pretty big I would like to think it’s not the best. I did originally make the login system much more complex and complete but as you say these things take so long to prepare. You might be logged - see last step the idle timer? Are you being logged out by that? I definitely want to do a full login system tutorial. I will make a part 2 from this tutorial and build upon it to create the function you mentioned. Definitely will see more Django and Vue. Any other tutorial suggestions please let me know
Thanks, i really misunderstood the conception of idle timer ... In general, there are plenty good tutorials on Django, as well on Vue, but for me as a beginner the key problem is integration between the two. So, after completing Vue tutorial on authentication (firebase), i'm still unable to make this work with Django. The same with Django tutorials (that are mostly based on react frontend). Sure, it's due to my lack of experience, but if you make content on Django + Vue functionality, that will be PRECIOUS ! (just anything, img upload, forms, blog, comments, rating, literally anything you consider to be useful) Have a nice day )
Any chance you could do this part, except using httpOnly cookies for authentication? Seems really hard to find. A lot of evidence suggesting localstorage is unsafe for storing the token based on OWASP recommendations due to javascript being able to access it, risk of XSS. Afaik simple-JWT for django doesn't allow for the token to be sent as a cookie though
With JWT token, how we can allow to new users to register? in tutorial you created new user by terminal. What can we do, if user don't have access to admin panel?
Awesome video! I am learning so much with your tutorials! How would you incorporate LocalStorage with this code, so a user stays logged in when he navigates to different pages. And is it possible to register users too? Keep up the good work ;-)
Hi Patrick, sorry when I built that, I was too much in a rush to get it out that I left it out. It is a simple process. I am itching to get back to vue. My next vue / Django tutorial will be a full login system with user access levels. Promise it won’t be long to wait - end of next week I am aiming for - hopefully before! To answer your question directly is difficult without just building you an example.
@@veryacademy first of all, don't be sorry! You are making great tutorials! Looking forward to seeing your new video next week. It would be great seeing the tutorial with password reset too :D
Thank you so much for your tutorial, it is so good. I am a beginner of vue and django, when I tried to run your project, it logs me out every time I refresh the page or click the post page. I tried to change the idletime to a larger number, and tried to delete the IdleVue related code, but it still not works, so what is the problem? Thank you so much for your help.
I dont think I have an example to show you but here is something that might be useful: stackoverflow.com/questions/43567052/csrf-token-of-django-into-vuejs-when-seperate-them
Thanks for the video, but a lot of stuff is missing. How to deal with expired token? I save accesToken in localstorage but it expires quickly, how to fix that so that it automatically get new token using refeshToken to stay loggedIn ?
If you have encountered an error "'str' object has no attribute 'decode'", it is likely due to version of PyJWT. So just run -> pip install PyJWT==1.7.1
@@veryacademy Wow good luck on this :) I will wait for new series. Currently, for this video I just follow the Vue part using Vue 3 - by converting your code to Vue 3) If you can consider to make a full version/production ready Auth integration series with DRF & Vue 3, that will be really amazing.
Thank you! What would you like to see next? I said I will start a React series so probably will do some basic React tutorials and then I need to get a load of Bootstrap and CSS done for work, but happy to assist you and take some suggestions as to what you would like to see. When I get the website up and running you can post suggestions there and I will have a 'Next tutorial list'. Hope you are well.
I am still trying to grasp the concepts you have taught in this video....Actually I have not been able to find such tutorials on vuex state management...but when I see this video on vuex, I think I can get a hold of it....But as always, I am grateful to you for such amazing video tutorials....Definitely I have gained more knowledge after going through your tutorials...Keep such videos coming on DJango+Vue......Thank you
Access Tokens can be stored where ever you would like to store them. There are some general recommendations as to where the safest place to store them.
Hey, many thanks for the great video, just was I was looking for! I followed your instructions all the way but I just cannot get REST to accept my JWT token. I tried it exactly like you showed it in the video with Postman and everything else was setup the same way. Any ideas by any chance?
@@veryacademy Hey, thank you very much for your reply. It turns out that the order in which you include settings inside the settings.py for the REST framework matter. I had to place it above any other setting and only then did it work.
Hey, I will answer this more generally and we can start from there. When you first generate a token it is likely to have an expiration date attached to it. Therefore after that time it can no longer be used. A refresh token can be used to obtain a new key
hi grettings, i have a problem whem i test with postman i get this error 403 forbiden and in the return i get tha CSRF cookie not set. whats the problem ? thanks
Unsafe way but first check this - add this to the view @csrf_exempt def myview(request): ... As you might tell this will except csrf - if that solves the problem get back to me.
@@veryacademy sorry i solved that vuex error jeje thanks very good tutorial, ya resolvi el problema vuex, era una llave de mas :S xD soy de Venezuela pero ando en chile disculpa mi mal ingles xD saludos muy buen curso saludos
This might help you - thought that it wouldn't be useful for you just to say yes you can do it (i dont have any examples on the channel yet - but that would be a great tut, thank you)- stackoverflow.com/questions/48407790/restricting-all-the-views-to-authenticated-users-in-django
Thank you very much for this fast course about integrating Django as API with Vue
This is great. Thanks so much. As someone learning development, I have a decent understanding of building a simple API, and a simple frontend separately, but linking the 2 together like this is really not demonstrated enough and is super useful!
Thanks Joe, glad you managed to get value from it
Your videos are incredible. I would like to ask a question. I noticed that the link named Post is no longer in the Navbar file for this project, as it was in the previous video. In this video he appears on the page with the posts, so I would like to know where he is being indicated?
Sorry I can’t support this tutorial anymore, it was created a very long time ago.
The best tutorial i've see, god bless
Glad it was helpful!
THE BEST tutorial on youtube Thanks 😊
Hey Samer, thank you. Glad you found it useful. I will get back onto Vue.JS soon enough. The first tutorial I will do will be based around the Django Restful tutorial series I am doing at the moment where I will take this tutorial much further and in more detail. There is a few things missing if I remember from this tutorial - Not sure I got the refresh token working for example. 👍
@@veryacademy It will be great and complete content
Thanks 🙏 is this vue server side rendering or client side rendering?
It's been so long, I can't remember sorry!
Thank you so much for making this! I was able to learn so many things using Django and Vue. Thank you so much!
Thank you for watching, good luck with your future developments
Thanks for this very informative content. My question is: it safer to use Localstorage or cookies to store the token?
Great tutorial, i love it. Please, when will you implement the full login part, especially saving the token so that it dosen't log me out when ever i refresh. Also i'll like to see a tutorial where i can implement authorize view base on two or more conditions. thanks
Greatest tutorial in a whole youtube on django&vue authentication !
All these timecodes and stuff, lots of preparations for high quality content, thank you !!!
Please continue Python & Vue stack, its so little about this in the whole Web, in comparison with other frontend frameworks...
P.S. im getting automatically logged out silently using your github code, what can be the problem?
P.P.S can you make a full sign up, sign in, sign out tutorial, plz ? ( that was sooo cloze :) )
P.P.P.S perfect english man, pleasure to listen )
Thanks Kirill, RUclips is pretty big I would like to think it’s not the best. I did originally make the login system much more complex and complete but as you say these things take so long to prepare. You might be logged - see last step the idle timer? Are you being logged out by that? I definitely want to do a full login system tutorial. I will make a part 2 from this tutorial and build upon it to create the function you mentioned. Definitely will see more Django and Vue. Any other tutorial suggestions please let me know
Thanks, i really misunderstood the conception of idle timer ...
In general, there are plenty good tutorials on Django, as well on Vue, but for me as a beginner the key problem is integration between the two. So, after completing Vue tutorial on authentication (firebase), i'm still unable to make this work with Django. The same with Django tutorials (that are mostly based on react frontend).
Sure, it's due to my lack of experience, but if you make content on Django + Vue functionality, that will be PRECIOUS ! (just anything, img upload, forms, blog, comments, rating, literally anything you consider to be useful)
Have a nice day )
Thanks that’s really helpful
Any chance you could do this part, except using httpOnly cookies for authentication? Seems really hard to find.
A lot of evidence suggesting localstorage is unsafe for storing the token based on OWASP recommendations due to javascript being able to access it, risk of XSS.
Afaik simple-JWT for django doesn't allow for the token to be sent as a cookie though
Received and working on it
With JWT token, how we can allow to new users to register? in tutorial you created new user by terminal. What can we do, if user don't have access to admin panel?
Hey Artem, sorry for not getting back to you. It is a long answer, but you just, I say just, need to build a login feature!
Amazing content! So useful!
Glad you think so! Thank you! 👍
Awesome video! I am learning so much with your tutorials!
How would you incorporate LocalStorage with this code, so a user stays logged in when he navigates to different pages. And is it possible to register users too?
Keep up the good work ;-)
Hi Patrick, sorry when I built that, I was too much in a rush to get it out that I left it out. It is a simple process. I am itching to get back to vue. My next vue / Django tutorial will be a full login system with user access levels. Promise it won’t be long to wait - end of next week I am aiming for - hopefully before! To answer your question directly is difficult without just building you an example.
@@veryacademy first of all, don't be sorry! You are making great tutorials! Looking forward to seeing your new video next week. It would be great seeing the tutorial with password reset too :D
Hi @@veryacademy! I was wondering when you are going to release the full login system with user access levels, really curious to see your tutorial!
@@veryacademy We are still waiting for it.
Thank you so much for your tutorial, it is so good.
I am a beginner of vue and django, when I tried to run your project, it logs me out every time I refresh the page or click the post page. I tried to change the idletime to a larger number, and tried to delete the IdleVue related code, but it still not works, so what is the problem? Thank you so much for your help.
do you have a tutorial on how to register for an account?
The best tutorial about vue and django so far in the internet. Thanks man!!!
Thank you! Only have 2 or 3 videos with Vue and Django. They are very popular that is for sure!
@@veryacademy can you do a video on how we bundle Django and vue with webpack and make a single deployable Django build?
Thank u so much brother for this tutorial.....brother please tell me how to send csrf token through vue for django application
I dont think I have an example to show you but here is something that might be useful:
stackoverflow.com/questions/43567052/csrf-token-of-django-into-vuejs-when-seperate-them
I want full video with refreshing token plz
Thanks for the video, but a lot of stuff is missing.
How to deal with expired token?
I save accesToken in localstorage but it expires quickly, how to fix that so that it automatically get new token using refeshToken to stay loggedIn ?
If you have encountered an error "'str' object has no attribute 'decode'", it is likely due to version of PyJWT.
So just run -> pip install PyJWT==1.7.1
Thank you! - This is a bit outdated now - wont be too long new vue soon! Well about 4-8 weeks 👍
@@veryacademy Wow good luck on this :) I will wait for new series. Currently, for this video I just follow the Vue part using Vue 3 - by converting your code to Vue 3)
If you can consider to make a full version/production ready Auth integration series with DRF & Vue 3, that will be really amazing.
Thank you 😊
Thank you! What would you like to see next? I said I will start a React series so probably will do some basic React tutorials and then I need to get a load of Bootstrap and CSS done for work, but happy to assist you and take some suggestions as to what you would like to see. When I get the website up and running you can post suggestions there and I will have a 'Next tutorial list'. Hope you are well.
I am still trying to grasp the concepts you have taught in this video....Actually I have not been able to find such tutorials on vuex state management...but when I see this video on vuex, I think I can get a hold of it....But as always, I am grateful to you for such amazing video tutorials....Definitely I have gained more knowledge after going through your tutorials...Keep such videos coming on DJango+Vue......Thank you
So we don't need to store accessToken and refreshToken in localStorage. Or do I miss something? Thank you in advance.
Access Tokens can be stored where ever you would like to store them. There are some general recommendations as to where the safest place to store them.
thank you
Thank you soooooo much🙆♂️
You're welcome 😊
Hey, many thanks for the great video, just was I was looking for! I followed your instructions all the way but I just cannot get REST to accept my JWT token. I tried it exactly like you showed it in the video with Postman and everything else was setup the same way. Any ideas by any chance?
Hi Lauder - sorry not to get back to you. Its a tricky one to suggest base on what you have said - sorry - does the code example work?
@@veryacademy Hey, thank you very much for your reply. It turns out that the order in which you include settings inside the settings.py for the REST framework matter. I had to place it above any other setting and only then did it work.
Found it ;). Thanks again for this wish I found it earlier!
Hi Joshua, glad you found it.
Best channel python framwork 👍request with flask
Thank you!
Can you provide references for localstorage or sessionstorage on your tutorial, when i tried to impliment it is not working.
thanks
What happens when token expires?
Hey, I will answer this more generally and we can start from there. When you first generate a token it is likely to have an expiration date attached to it. Therefore after that time it can no longer be used. A refresh token can be used to obtain a new key
hi grettings, i have a problem whem i test with postman i get this error 403 forbiden and in the return i get tha CSRF cookie not set. whats the problem ? thanks
Unsafe way but first check this - add this to the view
@csrf_exempt
def myview(request):
...
As you might tell this will except csrf - if that solves the problem get back to me.
@@veryacademy sorry i solved that vuex error jeje thanks very good tutorial, ya resolvi el problema vuex, era una llave de mas :S xD soy de Venezuela pero ando en chile disculpa mi mal ingles xD saludos muy buen curso saludos
Is there a way to require login on all views (except for login) without manually writing it in meta for all views?
This might help you - thought that it wouldn't be useful for you just to say yes you can do it (i dont have any examples on the channel yet - but that would be a great tut, thank you)- stackoverflow.com/questions/48407790/restricting-all-the-views-to-authenticated-users-in-django
Top3
sir ur name?
Zander sir 👍
i liked you allooot bur, in second time please put real files......... dont deleteeeeeeeeeeee guesssssssssss
Really sorry to let you down again! These are old tutorials when I was starting out.