Skip to content

Marfullsen/django-spa-cross-origin-auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Django + SPA (cross origin) Auth

Cookie based authentication, frontend and backend separated, cross origin.

Original Article here

Logged Vue

Updated

  • Bug with obsolete component solved using --openssl-legacy-provider
  • Clon written with Vue3 added.

Getting Started

Open a console for the frontend and another one for the backend. Keep both active to run the project.

Run Django:

$ cd backend
$ python -m venv venv && source venv/bin/activate
(venv)$ pip install -r requirements.txt
(venv)$ python manage.py migrate
(venv)$ python manage.py runserver

Choose between React or Vue for the frontend.

Run React:

$ cd frontend_react
$ npm install
$ npm start

Test at http://localhost:3000/.

or

Run Vue:

$ cd frontend_vue
$ npm install
$ npm run dev

Test at http://localhost:5173/.

About

Simplest cross origin authentication with Django using Single Page Applications (React/Vue3).

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published