Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

feat(oauth): fix url for allauth, removed dj-rest-auth Google, GitHub and Facebook URL patterns from urls.py

pankaj-basnetcd44264f6577
diff --git a/wger/urls.py b/wger/urls.py
index 7b0d74bdd..b52b360c4 100644
--- a/wger/urls.py
+++ b/wger/urls.py
@@ -372,34 +372,16 @@ urlpatterns += [
SpectacularRedocView.as_view(url_name='schema'),
name='api-redoc',
),
- path('accounts/', include('allauth.account.urls')),
]
if settings.WGER_SETTINGS.get('USE_SOCIAL_AUTH', False):
urlpatterns += [
- path('accounts/', include('allauth.socialaccount.urls')),
- path('auth/registration/', include('dj_rest_auth.registration.urls')),
- path('auth/google/', core_api_views.GoogleLogin.as_view(), name='google_rest_login'),
+ path('accounts/', include('allauth.urls')),
+ ]
+else:
+ urlpatterns += [
+ path('accounts/', include('allauth.account.urls')),
]
-
- if settings.WGER_SETTINGS.get('USE_GITHUB_AUTH', False):
- urlpatterns += [
- path(
- 'auth/github/',
- core_api_views.GithubLogin.as_view(),
- name='github_rest_login',
- ),
- ]
-
- # Facebook REST endpoint — only added when Facebook auth is enabled
- if settings.WGER_SETTINGS.get('USE_FACEBOOK_AUTH', False):
- urlpatterns += [
- path(
- 'auth/facebook/',
- core_api_views.FacebookLogin.as_view(),
- name='facebook_rest_login',
- ),
- ]
#
# URL for user uploaded files, served like this during development only