diff options
author | Will Hunt <willh@matrix.org> | 2021-06-29 21:49:25 +0100 |
---|---|---|
committer | Will Hunt <willh@matrix.org> | 2021-06-29 21:49:25 +0100 |
commit | 81dd28c2165128b268f48f1c813683ae6cdc0c7c (patch) | |
tree | c4499c8e115bb1000f1ece3703a82ef7d554acd3 /synapse/api/auth.py | |
parent | Merge tag 'v1.37.0rc1' into hs/hacked-together-event-cache (diff) | |
parent | Merge branch 'release-v1.37' into develop (diff) | |
download | synapse-81dd28c2165128b268f48f1c813683ae6cdc0c7c.tar.xz |
Merge remote-tracking branch 'origin/develop' into hs/hacked-together-event-cache
Diffstat (limited to 'synapse/api/auth.py')
-rw-r--r-- | synapse/api/auth.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/api/auth.py b/synapse/api/auth.py index edf1b918eb..29cf257633 100644 --- a/synapse/api/auth.py +++ b/synapse/api/auth.py @@ -245,6 +245,11 @@ class Auth: errcode=Codes.GUEST_ACCESS_FORBIDDEN, ) + # Mark the token as used. This is used to invalidate old refresh + # tokens after some time. + if not user_info.token_used and token_id is not None: + await self.store.mark_access_token_as_used(token_id) + requester = create_requester( user_info.user_id, token_id, |