Commit Graph

9319 Commits

Author SHA1 Message Date
pankaj-basnet
e4bc965374 feat(oauth): oauth social login for web UI (allauth) only, removed Google, GitHub and Facebook SocialLoginView REST endpoints
These views are out of scope for the current PR which focuses on
template-based Google OAuth only. The REST token exchange endpoints
for GitHub and Facebook will be added in a future issue once the
Google implementation is stable and merged.

Files changed:
- wger/core/api/views.py: remove GithubLogin, FacebookLogin classes
  and their conditional imports (GitHubOAuth2Adapter, FacebookOAuth2Adapter)
2026-05-18 17:05:00 +02:00
pankaj-basnet
b06cbb7955 create socialApp for allauth oauth in authProxyMiddlewareTests 2026-05-18 17:05:00 +02:00
pankaj-basnet
777c3b928d feat(auth): add Google, GitHub and Facebook OAuth support 2026-05-18 17:05:00 +02:00
pankaj-basnet
60dc22c774 fix(auth): add use_social_auth to global context 2026-05-18 17:05:00 +02:00
pankaj-basnet
c572d3e35e fix(auth): hide Google OAuth behind configuration flag
- 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
2026-05-18 17:05:00 +02:00
pankaj-basnet
10e26e40d2 Feat: Implement dj-rest-auth for Google OAuth API endpoints
- 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
2026-05-18 17:05:00 +02:00
pankaj-basnet
73fc3c6bc6 Feat: Implement Google OAuth using django-allauth for user authentication 2026-05-18 17:04:59 +02:00
Roland Geider
51510bdb97 Add two-factor authentication 2026-05-18 17:04:59 +02:00
Roland Geider
b4cf3d47ac Replace the registration view with allauth's 2026-05-18 17:04:59 +02:00
Roland Geider
a19f3bdeb1 Replace the login view with allauth's 2026-05-18 17:04:59 +02:00
Roland Geider
ae767543ed Move the email changing logic to allauth
This also takes care of having to deal with the data of two forms in the prefs
2026-05-18 17:04:59 +02:00
Roland Geider
a9b96bf7d0 Replace our own EmailAuthBackend with allauth's AuthenticationBackend 2026-05-18 17:04:59 +02:00
Roland Geider
9ea02be8a5 Create entries in EmailAddress for users created by gym and auth headers 2026-05-18 17:04:44 +02:00
Roland Geider
fc952f0d48 Fix tests 2026-05-18 17:02:55 +02:00
Roland Geider
cbb78c1e5c Merge remote-tracking branch 'origin/master' into powersync 2026-05-18 16:54:49 +02:00
Roland Geider
a9d4b29a89 Read the PS_DATABASE_URI variable, if set 2026-05-18 15:04:33 +02:00
Roland Geider
64f64b5512 Make the linter happy 2026-05-18 12:33:18 +02:00
Roland Geider
1664ed6196 Use correct date form for birthday 2026-05-18 12:12:06 +02:00
Roland Geider
b2637541ea Merge pull request #2343 from Ewin7/fix/off-product-name
Fix: Handle missing product_name in Open Food Facts import
2026-05-18 11:20:25 +02:00
Roland Geider
ebd1fe4e30 Small tweaks to the language detection logic, add simple tests 2026-05-18 11:15:26 +02:00
Roland Geider
ca460d15ae Merge pull request #2341 from wger-project/dependabot/uv/faker-40.18.0
Bump faker from 40.15.0 to 40.18.0
2026-05-18 11:05:24 +02:00
Roland Geider
af1aeee204 Move the email changing logic to allauth
This also takes care of having to deal with the data of two forms in the prefs

# Conflicts:
#	settings/settings_global.py

Fixes #2342
2026-05-18 10:58:45 +02:00
Roland Geider
eb46ea69d9 Change ingredient image upload path
With currently several hundred of thousands of images, putting them all in one
folder was starting to cause problems. We now shard them by UUID, which spreads
them evenly over two levels.
2026-05-18 10:38:53 +02:00
birjd002
94b3ac683f Merge branch 'master' into feature/username-suggestion-system 2026-05-18 17:13:01 +09:30
birjd002
06bf9c11fd Update CHANGELOG.md to include change description 2026-05-18 17:06:17 +09:30
birjd002
e9ca8f47e1 Add generate_username_suggestions tests 2026-05-18 16:53:39 +09:30
birjd002
626a2d15b6 Add username suggestions to registration forms 2026-05-18 16:09:30 +09:30
birjd002
3df473848f Add username suggestions to registration serializer
Also replaces the DRF UniqueValidator with validate_username func to return custom string message.
2026-05-18 16:07:45 +09:30
birjd002
9b3f973ca4 Add util function to generate usernames 2026-05-18 15:20:42 +09:30
Roland Geider
9d705eef3e Remove unused thumbnail sizes
These were not being used and were using many GB on the official server
2026-05-17 22:11:17 +02:00
Ewin7
3a065088bd style: ruff formatting:
- ruff format && isort .
2026-05-17 17:01:54 +02:00
Ewin7
e0bda16a66 fix: relax product_name check for Open Food Facts import
- Removed 'product_name' from OFF_REQUIRED_TOP_LEVEL check.
- Added fallback logic to handle products that only provide localized product names (e.g., product_name_en, product_name_de).
- KeyError throw if no product name exists in any language.
2026-05-17 16:45:22 +02:00
dependabot[bot]
589867f66b Bump faker from 40.15.0 to 40.18.0
Bumps [faker](https://github.com/joke2k/faker) from 40.15.0 to 40.18.0.
- [Release notes](https://github.com/joke2k/faker/releases)
- [Changelog](https://github.com/joke2k/faker/blob/v40.18.0/CHANGELOG.md)
- [Commits](https://github.com/joke2k/faker/compare/v40.15.0...v40.18.0)

---
updated-dependencies:
- dependency-name: faker
  dependency-version: 40.18.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-14 23:24:44 +00:00
Roland Geider
f3c0932a95 Add tests and authorization checks for gym mass-email 2026-05-14 17:27:14 +02:00
Roland Geider
407a0aab0c Improve handling of emails in our auth backend 2026-05-14 16:55:23 +02:00
Roland Geider
8ca02c43c8 Add safe URL handling for license attribution links 2026-05-14 16:16:46 +02:00
Roland Geider
de2d6d7e6b Add validators for downloaded images and videos 2026-05-14 16:06:13 +02:00
Roland Geider
4e7c0c3446 Add sanity checks for ingredient sync 2026-05-14 15:46:17 +02:00
Roland Geider
81058b9443 Fix ingredient permission issue 2026-05-14 15:34:04 +02:00
Roland Geider
08277ea89a Simplify querystring creation on the exercise admin template 2026-05-14 14:57:30 +02:00
Roland Geider
42791ff9bd Update to django 6
We also needed to revert django-prometheus to 2.4.0 since 2.4.1 is not compatible with
django 6 anymore, and it seems there's some problems with the status of the package:
https://github.com/django-commons/django-prometheus/issues/494
2026-05-14 14:57:30 +02:00
Roland Geider
c5584805c5 Merge pull request #2283 from wger-project/dependabot/uv/invoke-3.0.3
Bump invoke from 2.2.1 to 3.0.3
2026-05-14 14:53:33 +02:00
dependabot[bot]
f455d08066 Bump invoke from 2.2.1 to 3.0.3
Bumps [invoke](https://github.com/pyinvoke/invoke) from 2.2.1 to 3.0.3.
- [Commits](https://github.com/pyinvoke/invoke/compare/2.2.1...3.0.3)

---
updated-dependencies:
- dependency-name: invoke
  dependency-version: 3.0.3
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-14 12:49:42 +00:00
Roland Geider
e6f69abb76 Merge pull request #2267 from wger-project/dependabot/npm_and_yarn/picomatch-4.0.4
Bump picomatch from 4.0.3 to 4.0.4
2026-05-14 14:49:24 +02:00
Roland Geider
530ca9c049 Fix test and linting 2026-05-13 21:21:16 +02:00
Roland Geider
c89e078628 Extract version from version.py for docker image tagging 2026-05-13 21:15:53 +02:00
Roland Geider
5e53249211 Merge remote-tracking branch 'origin/master' into powersync
# Conflicts:
#	CHANGELOG.md
#	uv.lock
#	wger/manager/models/log.py
#	wger/manager/models/session.py
2026-05-13 21:15:32 +02:00
Github-actions
d7596ac043 Automatic linting 2026-05-13 18:40:40 +00:00
Roland Geider
72dc042c32 Merge pull request #2339 from wger-project/feature/exercise-submission
Improvements to exercise submission api
2026-05-13 20:40:20 +02:00
Roland Geider
ed74adc0a6 Remove trailing space 2026-05-13 20:36:58 +02:00