Token authentication example on Django and Vue step by step.
This example contains 6 steps in the different branches.
- main - final version
- step-1-api - simple api on DRF
- step-2-auth-backend - token authentication on backend
- step-3-frontend - simple vue frontend
- step-4-login-form - login form and callback
- step-5-get-token - authentication with token
- step-6-save-token - save token to
LocalStorage
andCookies
- In one terminal
make start
- In another terminal
cd frontend
npm i
npm run dev
You can move step by step changing branches. Or download final example from main
branch
You can use make download_examples
command to download all examples as folders.
Example will be save to ../django-vue-authentications/<subfolder>/