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
Instead of a "create-settings" command, which didn't contain all the options
and was a bit awkward, we now have specific settings used for different things.