mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-13 16:34:52 +03:00
Revert "Added django oauth for easier authentication"
This reverts commit e05d053494
.
This commit is contained in:
parent
8cded319b2
commit
4ec6fe95ae
|
@ -81,7 +81,6 @@ THIRD_PARTY_APPS = [
|
|||
"rest_framework",
|
||||
{%- if cookiecutter.js_task_runner == "CreateReactApp" -%}
|
||||
"corsheaders",
|
||||
"oauth2_provider",
|
||||
{%- endif %}
|
||||
{%- if cookiecutter.use_celery == 'y' -%}
|
||||
"django_celery_beat",
|
||||
|
@ -354,18 +353,6 @@ REST_FRAMEWORK = {
|
|||
"DEFAULT_SCHEMA_CLASS": "rest_framework.schemas.coreapi.AutoSchema",
|
||||
}
|
||||
|
||||
# OAUTH2 CONFIGURATION
|
||||
# ------------------------------------------------------------------------------
|
||||
# https://django-oauth-toolkit.readthedocs.io/en/latest/rest-framework/getting_started.html
|
||||
OAUTH2_PROVIDER = {
|
||||
# this is the list of available scopes
|
||||
"SCOPES": {
|
||||
"read": "Read scope",
|
||||
"write": "Write scope",
|
||||
},
|
||||
"ACCESS_TOKEN_EXPIRE_SECONDS": 31536000, # Sets OAUTH access tokens good for a year
|
||||
}
|
||||
|
||||
# Graphene Setup
|
||||
# ------------------------------------------------------------------------------
|
||||
# See: http://docs.graphene-python.org/projects/django/en/latest/tutorial-plain/#update-settings
|
||||
|
|
|
@ -23,9 +23,6 @@ urlpatterns = [
|
|||
path("api-docs/", include_docs_urls(title="{{ cookiecutter.project_name }} REST API", public=False)),
|
||||
path("graphql/", csrf_exempt(FileUploadGraphQLView.as_view(graphiql=True, pretty=True))),
|
||||
|
||||
# OAUTH2: https://github.com/evonove/django-oauth-toolkit
|
||||
path("oauth/", include('oauth2_provider.urls', namespace='oauth2_provider')),
|
||||
|
||||
# User management from django-all-auth
|
||||
path("about/", TemplateView.as_view(template_name="pages/about.html"), name="about"),
|
||||
path("users/", include("{{ cookiecutter.project_slug }}.users.urls", namespace="users")),
|
||||
|
|
|
@ -43,5 +43,4 @@ coreapi==2.3.3 # https://github.com/core-api/python-client
|
|||
# Django/ReactJS integration
|
||||
# ------------------------------------------------------------------------------
|
||||
django-cors-headers==2.4.0 # https://github.com/ottoyiu/django-cors-headers
|
||||
django-oauth-toolkit==1.2.0 # http://dot.evonove.it/#setup
|
||||
{%- endif %}
|
||||
|
|
Loading…
Reference in New Issue
Block a user