diff --git a/boofilsic/settings.py b/boofilsic/settings.py index 10d17464..e747f623 100644 --- a/boofilsic/settings.py +++ b/boofilsic/settings.py @@ -102,6 +102,9 @@ env = environ.FileAwareEnv( DISCORD_WEBHOOKS=(dict, {"user-report": None}), # Slack API token, for sending exceptions to Slack, may deprecate in future SLACK_API_TOKEN=(str, ""), + THREADS_APP_ID=(str, ""), + THREADS_APP_SECRET=(str, ""), + BLUESKY_LOGIN_ENABLED=(bool, False), # SSL only, better be True for production security SSL_ONLY=(bool, False), NEODB_SENTRY_DSN=(str, ""), @@ -174,8 +177,11 @@ elif _parsed_email_url.scheme: else: ENABLE_LOGIN_EMAIL = False -ENABLE_LOGIN_THREADS = False -ENABLE_LOGIN_BLUESKY = False + +THREADS_APP_ID = env("THREADS_APP_ID") +THREADS_APP_SECRET = env("THREADS_APP_SECRET") + +BLUESKY_LOGIN_ENABLED = env("BLUESKY_LOGIN_ENABLED") SITE_DOMAIN = env("NEODB_SITE_DOMAIN").lower() SITE_INFO = { diff --git a/boofilsic/urls.py b/boofilsic/urls.py index fe54996a..25f9967b 100644 --- a/boofilsic/urls.py +++ b/boofilsic/urls.py @@ -27,9 +27,10 @@ urlpatterns = [ path("login/", login), path("markdownx/", include("markdownx.urls")), path("account/", include("users.urls")), + path("account/", include("mastodon.urls")), path( "users/connect/", - RedirectView.as_view(url="/account/connect", query_string=True), + RedirectView.as_view(url="/mastodon/login", query_string=True), ), path( "auth/edit", # some apps like elk will use this url diff --git a/common/setup.py b/common/setup.py index 6fecee50..e4536cfd 100644 --- a/common/setup.py +++ b/common/setup.py @@ -1,4 +1,3 @@ -import django from django.conf import settings from django.core.checks import Error, Warning from loguru import logger @@ -7,7 +6,6 @@ from catalog.search.models import Indexer from common.models import JobManager from takahe.models import Config as TakaheConfig from takahe.models import Domain as TakaheDomain -from takahe.models import Follow as TakaheFollow from takahe.models import Identity as TakaheIdentity from takahe.models import Relay as TakaheRelay from takahe.models import User as TakaheUser diff --git a/common/templates/_header.html b/common/templates/_header.html index 900e3f51..0eeebac8 100644 --- a/common/templates/_header.html +++ b/common/templates/_header.html @@ -119,13 +119,6 @@ -{% if request.user.is_authenticated and not request.user.mastodon_username and not request.user.username %} - -{% endif %} {% if messages %}