Skip to content

Commit d2c8b96

Browse files
trbssynasius
authored andcommitted
add documentation for refresh_token_expire_seconds
1 parent 32c8053 commit d2c8b96

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ Ash Christopher
1414
Rodney Richardson
1515
Hiroki Kiyohara
1616
Diego Garcia
17+
Bas van Oostveen

docs/settings.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,19 @@ WRITE_SCOPE
8686
~~~~~~~~~~~
8787
The name of the *write* scope.
8888

89+
REFRESH_TOKEN_EXPIRE_SECONDS
90+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
91+
The number of seconds before a refresh token gets removed from the database by
92+
the ``cleartokens``` management command. It's important that ``cleartokens``
93+
runs regularly (eg: via cron) in order for this setting to work.
94+
95+
If ``cleartokens`` runs daily the maximum delay before a refresh token is
96+
removed is ``REFRESH_TOKEN_EXPIRE_SECONDS`` + 1 day. This is normally not a
97+
problem since refresh tokens are long lived.
98+
99+
Note: Refresh tokens need to expire before AccessTokens can be removed from the
100+
database. Using ``cleartokens`` without ``REFRESH_TOKEN_EXPIRE_SECONDS`` has limited effect.
101+
89102
REQUEST_APPROVAL_PROMPT
90103
~~~~~~~~~~~~~~~~~~~~~~~
91104
Can be ``'force'`` or ``'auto'``.

0 commit comments

Comments
 (0)