You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(auth): Revoke refresh token on password change (#928)
* feat(auth): Revoke refresh token on password change
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* refactor(serializers): Correct validation order in TokenRefreshSerializer
* refactor: centralize password changed error messages in error dictionaries
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* feat(serializers): Add full user validation to sliding token refresh
Implements the same user validation logic (active status, password change)
in to ensure consistent behavior with the
standard .
* refactor: Inline password hash comparison in serializers
Simplifies the conditional check by removing temporary variables for the token hash and user password hash.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* BREAKING: return 401 AuthenticationFailed instead of 404 DoesNotExist for missing users
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,13 @@
1
+
## [Unreleased]
2
+
3
+
### Changed
4
+
-**BREAKING:** In `serializers.py`, when a user linked to a token is missing or deleted, the code now raises `AuthenticationFailed("no_active_account")` instead of allowing `DoesNotExist` to propagate.
5
+
- Response changed from **404 Not Found** → **401 Unauthorized**.
6
+
- Improves security by not leaking whether a user/token exists.
7
+
- Follows RFC 7235, where authentication failures should return 401.
8
+
- Clearer for clients: signals an auth issue instead of suggesting the endpoint is missing.
9
+
10
+
1
11
## 5.5.1
2
12
3
13
Missing Migration for rest_framework_simplejwt.token_blacklist app. A previously missing migration (0013_blacklist) has now been added. This issue arose because the migration file was mistakenly not generated earlier. This migration was never part of an official release, but users following the latest master branch may have encountered it.
0 commit comments