feat: init django-oauth-toolkit
parent
a04cbf0943
commit
cc1ecaf6a0
|
@ -44,11 +44,13 @@ INSTALLED_APPS = [
|
|||
"accounts",
|
||||
"dash",
|
||||
"support",
|
||||
"oauth2_provider",
|
||||
]
|
||||
|
||||
MIDDLEWARE = [
|
||||
"django.middleware.security.SecurityMiddleware",
|
||||
"django.contrib.sessions.middleware.SessionMiddleware",
|
||||
"oauth2_provider.middleware.OAuth2TokenMiddleware",
|
||||
"django.middleware.common.CommonMiddleware",
|
||||
"django.middleware.csrf.CsrfViewMiddleware",
|
||||
"django.contrib.auth.middleware.AuthenticationMiddleware",
|
||||
|
@ -131,6 +133,17 @@ STATICFILES_DIRS = [
|
|||
|
||||
DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"
|
||||
|
||||
### django-oauth-toolkit configuration
|
||||
|
||||
OAUTH2_PROVIDER = {
|
||||
"OIDC_ENABLED": True,
|
||||
"PKCE_REQUIRED": False,
|
||||
"SCOPES": {
|
||||
"openid": "OpenID Connect scope",
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
### Dashbaord specific configuration options
|
||||
|
||||
HOSTEA = {
|
||||
|
|
|
@ -17,6 +17,7 @@ from django.contrib import admin
|
|||
from django.urls import path, include
|
||||
|
||||
urlpatterns = [
|
||||
path("o/", include("oauth2_provider.urls", namespace="oauth2_provider")),
|
||||
path("admin/", admin.site.urls),
|
||||
path("dash/", include("dash.urls")),
|
||||
path("support/", include("support.urls")),
|
||||
|
|
Loading…
Reference in New Issue