diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_tokenauth.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/mod_tokenauth.lua b/plugins/mod_tokenauth.lua index cf34b48c..6c94e34f 100644 --- a/plugins/mod_tokenauth.lua +++ b/plugins/mod_tokenauth.lua @@ -159,6 +159,11 @@ local function _get_validated_grant_info(username, grant) return nil, "expired"; end + if not grant.tokens then + module:log("debug", "Token grant without tokens, cleaning up"); + token_store:set_key(username, grant.id, nil); + return nil, "invalid"; + end return grant; end |