File tree 3 files changed +14
-0
lines changed
3 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -104,6 +104,7 @@ Shaheed Haque
104
104
Shaun Stanworth
105
105
Silvano Cerza
106
106
Sora Yanai
107
+ Sören Wegener
107
108
Spencer Carroll
108
109
Stéphane Raimbault
109
110
Tom Evans
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
16
16
17
17
## [ unreleased]
18
18
### Added
19
+ * #1404 Add a new setting ` REFRESH_TOKEN_REUSE_PROTECTION `
19
20
### Changed
20
21
### Deprecated
21
22
### Removed
Original file line number Diff line number Diff line change @@ -185,6 +185,18 @@ The import string of the class (model) representing your refresh tokens. Overwri
185
185
this value if you wrote your own implementation (subclass of
186
186
``oauth2_provider.models.RefreshToken ``).
187
187
188
+ REFRESH_TOKEN_REUSE_PROTECTION
189
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
190
+ When this is set to ``True `` (default ``False ``), and ``ROTATE_REFRESH_TOKEN `` is used, the server will check
191
+ if a previously, already revoked refresh token is used a second time. If it detects a reuse, it will automatically
192
+ revoke all related refresh tokens.
193
+ A reused refresh token indicates a breach. Since the server can't determine which request came from the legitimate
194
+ user and which from an attacker, it will end the session for both. The user is required to perform a new login.
195
+
196
+ Can be used in combination with ``REFRESH_TOKEN_GRACE_PERIOD_SECONDS ``
197
+
198
+ More details at https://datatracker.ietf.org/doc/html/draft-ietf-oauth-security-topics-29#name-recommendations
199
+
188
200
ROTATE_REFRESH_TOKEN
189
201
~~~~~~~~~~~~~~~~~~~~
190
202
When is set to ``True `` (default) a new refresh token is issued to the client when the client refreshes an access token.
You can’t perform that action at this time.
0 commit comments