mod_http_oauth2/mod_http_oauth2.lua
changeset 5650 d67980d9e12d
parent 5647 73c3d5bfce3e
child 5669 bbde136a4c29
--- a/mod_http_oauth2/mod_http_oauth2.lua	Mon Sep 11 10:19:38 2023 +0200
+++ b/mod_http_oauth2/mod_http_oauth2.lua	Mon Sep 11 10:48:31 2023 +0200
@@ -272,7 +272,7 @@
 	local grant = refresh_token_info and refresh_token_info.grant;
 	if not grant then
 		-- No existing grant, create one
-		grant = tokens.create_grant(token_jid, token_jid, default_refresh_ttl, token_data);
+		grant = tokens.create_grant(token_jid, token_jid, nil, token_data);
 	end
 
 	if refresh_token_info then
@@ -284,7 +284,7 @@
 		end
 	end
 	-- in with the new refresh token
-	local refresh_token = refresh_token_info ~= false and tokens.create_token(token_jid, grant.id, nil, nil, "oauth2-refresh");
+	local refresh_token = refresh_token_info ~= false and tokens.create_token(token_jid, grant.id, nil, default_refresh_ttl, "oauth2-refresh");
 
 	if role == "xmpp" then
 		-- Special scope meaning the users default role.