Provider settings live now completely in the SocialApp.settings field, which
makes this much more flexible as local administrators can choose which providers
they want to support without us having to keep a list in the settings.
The `USE_SOCIAL_AUTH` setting was removed in favor of the WGER_SOCIAL_PROVIDERS
list, which simply contains the desired list of providers.
The setup_social_oauth.py management command was deleted, users are referred to
the documentation, which explains how to save the different entries
As suggested by maintainer rolandgeider, add a dedicated USE_GOOGLE_AUTH
setting. USE_SOCIAL_AUTH is now auto-derived (True if any provider is
enabled) rather than being set manually.
This pattern scales cleanly when GitHub and Facebook are added in future
PRs — each provider gets its own flag, and USE_SOCIAL_AUTH stays in sync.
Files changed:
- settings/settings_global.py: add USE_GOOGLE_AUTH to WGER_SETTINGS
defaults, remove USE_GITHUB_AUTH/USE_FACEBOOK_AUTH, auto-derive
USE_SOCIAL_AUTH from provider flags
- settings/main.py: read USE_GOOGLE_AUTH from env, remove
USE_GITHUB_AUTH/USE_FACEBOOK_AUTH env reads, add auto-derive logic
- settings/local_dev.py: set USE_GOOGLE_AUTH=True, remove github/facebook
flags, add auto-derive logic
- settings/ci.py: set USE_GOOGLE_AUTH=False, remove github/facebook flags
- Add GOOGLE_OAUTH_ENABLED to WGER_SETTINGS in settings_global.py
- Conditionally include socialaccount apps in INSTALLED_APPS
- Wrap dj-rest-auth and allauth social URLs in setting checks
- Update setup_google_oauth command to guard against disabled state
- Add context processor variable to toggle UI login buttons
- Add dj-rest-auth to dependencies
- Register SocialLoginView for Google OAuth callback via REST
- Map dj-rest-auth URLs in wger/urls.py for mobile/headless auth
- Maintain compatibility with existing allauth template-based login
Simply calling .delete() takes care of deletion of entries in the local filesystem
of uploaded to some cloud storage if that option is used. Also, move the S3 options
from global settings so they can be used with the docker setup.