This app makes it extremely easy to build Django powered SPA's (Single Page App) or Mobile apps exposing all registration and authentication related functionality as CBV's (Class Base View) and REST (JSON)
Go to file
Michael 3b7b607cbd
Merge pull request #43 from Pinzauti/url-to-path
Changed url to path in documentation
2020-04-16 21:01:30 -05:00
.circleci Attempts to fix tests 2020-03-22 06:20:44 -05:00
demo Adds POC Login Form in React 2020-03-28 13:51:31 -05:00
dj_rest_auth Merge pull request #38 from necaris/fix/import-of-simplejwt 2020-04-16 01:57:20 -05:00
docs changed url to path 2020-04-16 15:38:03 +02:00
.coveralls.yml Adds coverage repo token 2020-03-06 18:04:47 -06:00
.gitignore blacklist refresh token on logout if REST_USE_JWT and added .idea to gitignore 2020-04-01 18:54:16 -04:00
AUTHORS Uses new org 2020-03-01 16:42:28 -06:00
CONTRIBUTING.md Adds contributing file 2020-03-06 17:48:57 -06:00
dev-requirements.txt Removes coveralls patch edit 2020-03-22 06:25:43 -05:00
LICENSE Adds circle CI 2020-02-29 18:58:59 -06:00
MANIFEST.in Renames project to dj-rest-auth 2020-02-29 17:59:38 -06:00
README.md deleted make file and adding testing section to README 2020-04-07 20:24:15 -04:00
runtests.py Fixes references to serializers + isort 2020-02-29 23:56:21 -06:00
setup.cfg Add wheel & metdata config 2018-08-21 21:29:15 -07:00
setup.py Bug fixes related to Simple JWT integrations 2020-04-16 01:59:04 -05:00

Dj-Rest-Auth

Jazzband Coverage Status

Drop-in API endpoints for handling authentication securely in Django Rest Framework. Works especially well with SPAs (e.g React, Vue, Angular), and Mobile applications.

Requirements

  • Django 2 or 3.
  • Python 3

Quick Setup

Install package

pip install dj-rest-auth

Add dj_rest_auth app to INSTALLED_APPS in your django settings.py:

INSTALLED_APPS = (
    ...,
    'rest_framework',
    'rest_framework.authtoken',
    ...,
    'dj_rest_auth'
)

Add URL patterns

urlpatterns = [
    url(r'^dj-rest-auth/', include('dj_rest_auth.urls'))
]

(Optional) Use Http-Only cookies

REST_USE_JWT = True
JWT_AUTH_COOKIE = 'jwt-auth'

Testing

To run the tests within a virtualenv, run python runtests.py from the repository directory. The easiest way to run test coverage is with coverage, which runs the tests against all supported Django installs. To run the test coverage within a virtualenv, run coverage run ./runtests.py from the repository directory then run coverage report.

Documentation

View the full documentation here: https://dj-rest-auth.readthedocs.io/en/latest/index.html

Acknowledgements

This project began as a fork of django-rest-auth. Big thanks to everyone who contributed to that repo!