Private
Public Access
1
0

oauth2 not working

This commit is contained in:
2024-05-26 17:01:45 +02:00
parent 1624371d68
commit 52d6e3b6bb
2 changed files with 7 additions and 5 deletions

View File

@@ -237,10 +237,10 @@ handler500 = views.error500_view
urlpatterns = [
re_path(r'^oauth2/', include('provider.oauth2.urls', namespace = 'oauth2')),
# re_path(r'^oauth2/', include('provider.oauth2.urls', namespace = 'oauth2')),
# re_path(r'^o/authorize/$', base.AuthorizationView.as_view(), name="authorize"),
# re_path(r'^o/token/$', base.TokenView.as_view(), name="token"),
path('o/', include('oauth2_provider.urls', namespace='oauth2_provider')),
re_path('^o/', include('oauth2_provider.urls', namespace='oauth2_provider')),
re_path(r'^', include(router.urls)),
re_path(r'^api-docs/$', views.schema_view, name='schema_view'),
re_path(r'^api-auth/', include('rest_framework.urls',

View File

@@ -72,8 +72,8 @@ INSTALLED_APPS = [
'datetimewidget',
'rest_framework_swagger',
'oauth2_provider',
#'provider',
#'provider.oauth2',
# 'provider',
# 'provider.oauth2',
'corsheaders',
'analytical',
'cookielaw',
@@ -194,6 +194,8 @@ DATABASES = {
# Password validation
# https://docs.djangoproject.com/en/1.9/ref/settings/#auth-password-validators
AUTH_USER_MLDEL = 'user.User'
AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
@@ -456,7 +458,7 @@ OAUTH2_PROVIDER = {
'ACCESS_TOKEN_MODEL': 'oauth2_provider.AccessToken',
'APPLICATION_MODEL': 'oauth2_provider.Application',
'REFRESH_TOKEN_MODEL': 'oauth2_provider.RefreshToken',
'ACCESS_TOKEN_EXPIRE_SECONDS': 360000,
'ACCESS_TOKEN_EXPIRE_SECONDS': 3600000,
"PKCE_REQUIRED": False,
# 'OAUTH2_BACKEND_CLASS': 'oauth2_provider.oauth2_backends.JSONOAuthLibCore'
}