mirror of
https://github.com/Tivix/django-rest-auth.git
synced 2024-12-02 13:53:43 +03:00
Adds JWT example to Readme
This commit is contained in:
parent
27226223f4
commit
fe06053abe
17
README.md
17
README.md
|
@ -18,6 +18,7 @@ Install package
|
||||||
|
|
||||||
Add `dj_rest_auth` app to INSTALLED_APPS in your django settings.py:
|
Add `dj_rest_auth` app to INSTALLED_APPS in your django settings.py:
|
||||||
|
|
||||||
|
```python
|
||||||
INSTALLED_APPS = (
|
INSTALLED_APPS = (
|
||||||
...,
|
...,
|
||||||
'rest_framework',
|
'rest_framework',
|
||||||
|
@ -25,13 +26,27 @@ Add `dj_rest_auth` app to INSTALLED_APPS in your django settings.py:
|
||||||
...,
|
...,
|
||||||
'dj_rest_auth'
|
'dj_rest_auth'
|
||||||
)
|
)
|
||||||
|
```
|
||||||
|
|
||||||
Add URL patterns
|
Add URL patterns
|
||||||
|
|
||||||
|
```python
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
url(r'^dj-rest-auth/', include('dj_rest_auth.urls'))
|
url(r'^dj-rest-auth/', include('dj_rest_auth.urls'))
|
||||||
]
|
]
|
||||||
|
```
|
||||||
|
|
||||||
|
(Optional)
|
||||||
|
|
||||||
|
Use Http-Only cookies
|
||||||
|
|
||||||
|
```python
|
||||||
|
REST_USE_JWT = True
|
||||||
|
JWT_AUTH_COOKIE = 'jwt-auth'
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Documentation
|
### Documentation
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user