From da4214ad61295ebd5d0179631da315b1bb5e7c33 Mon Sep 17 00:00:00 2001 From: Sean Molenaar Date: Tue, 14 Nov 2023 14:18:12 +0100 Subject: [PATCH] feat: add OAuth authentication Issue GH-2292 --- bookwyrm/settings.py | 1 + bookwyrm/urls.py | 1 + requirements.txt | 1 + 3 files changed, 3 insertions(+) diff --git a/bookwyrm/settings.py b/bookwyrm/settings.py index 4cecc4df6..dcc6107e5 100644 --- a/bookwyrm/settings.py +++ b/bookwyrm/settings.py @@ -99,6 +99,7 @@ INSTALLED_APPS = [ "django.contrib.messages", "django.contrib.staticfiles", "django.contrib.humanize", + "oauth2_provider", "sass_processor", "bookwyrm", "celery", diff --git a/bookwyrm/urls.py b/bookwyrm/urls.py index 8541f4fb6..3f9f07b21 100644 --- a/bookwyrm/urls.py +++ b/bookwyrm/urls.py @@ -785,6 +785,7 @@ urlpatterns = [ r"^summary_revoke_key/?$", views.summary_revoke_key, name="summary-revoke-key" ), path("guided-tour/", views.toggle_guided_tour), + re_path(r'^o/', include('oauth2_provider.urls', namespace='oauth2_provider')), ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) # Serves /static when DEBUG is true. diff --git a/requirements.txt b/requirements.txt index b01e110bf..0bb4028a8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -25,6 +25,7 @@ boto3==1.26.57 django-storages==1.13.2 django-storages[azure] django-redis==5.2.0 +django-oauth-toolkit==2.3.0 opentelemetry-api==1.16.0 opentelemetry-exporter-otlp-proto-grpc==1.16.0 opentelemetry-instrumentation-celery==0.37b0