NextAuth is using httpOnly cookies for authentication, so this is more secure than authentication with localStorage
It has Google and Github social authentication too... And it comes with awesome UI ...
django - for backend
dj-rest-auth - for Simple JWT authentication with httpOnly cookies
django-allauth - for social authentication
djangorestframework - for making Rest Api's
djangorestframework-simplejwt - for making JWT token based authentication
Checkout the frontend for this NextAuth-frontend
Clone this repo and cd <repo name>/
First, install the required packages( recommended in virtual env ):
pip install -r requirements.txt
Then start development server by:
python manage.py runserver
# or
python3 manage.py runserver
# or
./manage.py runserver
Server will be run in http://localhost:8000
Open http://localhost:8000 with your browser to see the result.
That's all, you can modify this backend and feel free make a pull request