Browse Source

Add django allauth useNewSocialCallbacks setting

David Burke 7 months ago
parent
commit
71aa6c0a5d
2 changed files with 4 additions and 3 deletions
  1. 2 0
      glitchtip/api/api.py
  2. 2 3
      glitchtip/settings.py

+ 2 - 0
glitchtip/api/api.py

@@ -136,6 +136,7 @@ class SettingsOut(CamelSchema):
     environment: Optional[str]
     version: str
     server_time_zone: str
+    use_new_social_callbacks: bool
 
 
 @api.get("settings/", response=SettingsOut, by_alias=True, auth=None)
@@ -179,6 +180,7 @@ async def get_settings(request: HttpRequest):
         "environment": settings.ENVIRONMENT,
         "version": settings.GLITCHTIP_VERSION,
         "server_time_zone": settings.TIME_ZONE,
+        "use_new_social_callbacks": settings.USE_NEW_SOCIAL_CALLBACKS,
     }
 
 

+ 2 - 3
glitchtip/settings.py

@@ -106,9 +106,6 @@ GLITCHTIP_MAX_FILE_LIFE_DAYS = env.int(
 # Freezes acceptance of new events, for use during db maintenance
 MAINTENANCE_EVENT_FREEZE = env.bool("MAINTENANCE_EVENT_FREEZE", False)
 
-# Allows saving of spans on transactions.
-ENABLE_PERFORMANCE_SPANS = env.bool("ENABLE_PERFORMANCE_SPANS", False)
-
 # For development purposes only, prints out inbound event store json
 EVENT_STORE_DEBUG = env.bool("EVENT_STORE_DEBUG", False)
 
@@ -634,6 +631,8 @@ ACCOUNT_USERNAME_REQUIRED = False
 ACCOUNT_USER_MODEL_USERNAME_FIELD = None
 ACCOUNT_ADAPTER = "glitchtip.social.MFAAccountAdapter"
 LOGIN_REDIRECT_URL = "/"
+# This config will later default to True and then be removed
+USE_NEW_SOCIAL_CALLBACKS = env.bool("USE_NEW_SOCIAL_CALLBACKS", False)
 # HEADLESS_ONLY = True
 # HEADLESS_FRONTEND_URLS = {
 #     "account_signup": "/login",