plugins/mod_tokenauth.lua
changeset 13360 bbbda8819331
parent 13325 19c814d4dd3a
--- a/plugins/mod_tokenauth.lua	Wed Nov 29 17:50:33 2023 +0000
+++ b/plugins/mod_tokenauth.lua	Wed Nov 29 17:51:34 2023 +0000
@@ -145,7 +145,7 @@
 	if type(grant) == "string" then
 		grant = token_store:get_key(username, grant);
 	end
-	if not grant or not grant.created then return nil; end
+	if not grant or not grant.created or not grant.id then return nil; end
 
 	-- Invalidate grants from before last password change
 	local account_info = usermanager.get_account_info(username, module.host);