feat: init django-oauth-toolkit

wip-payments
Aravinth Manivannan 2022-06-19 22:25:27 +05:30
parent a04cbf0943
commit cc1ecaf6a0
Signed by: realaravinth
GPG Key ID: AD9F0F08E855ED88
2 changed files with 14 additions and 0 deletions

View File

@ -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 = {

View File

@ -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")),