Skip to content

Commit fe093a0

Browse files
committed
Update documentation
1 parent b65580c commit fe093a0

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

Diff for: AUTHORS

+1
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ Shaheed Haque
104104
Shaun Stanworth
105105
Silvano Cerza
106106
Sora Yanai
107+
Sören Wegener
107108
Spencer Carroll
108109
Stéphane Raimbault
109110
Tom Evans

Diff for: CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1616

1717
## [unreleased]
1818
### Added
19+
* #1404 Add a new setting `REFRESH_TOKEN_REUSE_PROTECTION`
1920
### Changed
2021
### Deprecated
2122
### Removed

Diff for: docs/settings.rst

+12
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,18 @@ The import string of the class (model) representing your refresh tokens. Overwri
185185
this value if you wrote your own implementation (subclass of
186186
``oauth2_provider.models.RefreshToken``).
187187

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+
188200
ROTATE_REFRESH_TOKEN
189201
~~~~~~~~~~~~~~~~~~~~
190202
When is set to ``True`` (default) a new refresh token is issued to the client when the client refreshes an access token.

0 commit comments

Comments
 (0)