0

I have Django for my backend and vue for my frontend. I am using dj-rest-auth for authentication, and a token key is generated on each login. I could save this to vuex, but I am not really sure how to identify the user? I am building a blog, and editing of certain blog posts must be allowed only for the author? How should I get to generate the username from the token so that only the author can edit it?

1 Answers1

1

If you are trying to user JWT-auth - try to user Djoser, in this way it is no way to detect token by username - you should generate acess token and refresh token, you acess token will be obsolete - read more here

Vasily
  • 173
  • 11